OnDblClicked SlideView

Started by Oak3s, March 24, 2010, 06:43:51 PM

Previous topic - Next topic

Oak3s

I am trying to make an alternative to AutoCADs image tille menu.
I have totally stripped this code down, trying to find the problem. It is probably simple.... ???
The problem is the anchor bolt is always the block being inserted on a DblClicked event.
(defun c:test (/)
(dcl_project_load "SA-Block-Insertion-Image" t) ;load .odcl file
(dcl_form_show SA-Block-Insertion-Image_form1) ;show dialog box form1
(princ)
)
;*****************************************************************************************************************
(defun c:SA-Block-Insertion-Image_Form1_OnInitialize (/)
  (dcl_SlideView_Load SA-Block-Insertion-Image_Form1_SlideView1 "P:/SA-Drafting/Blocks/Slide_images/SA-Anchorbolt.sld")
  (dcl_SlideView_Load SA-Block-Insertion-Image_Form1_SlideView2 "P:/SA-Drafting/Blocks/Slide_images/SA-BoltNut.sld")
  (dcl_SlideView_Load SA-Block-Insertion-Image_Form1_SlideView3 "P:/SA-Drafting/Blocks/Slide_images/SA-Centerline.sld")
  (dcl_SlideView_Load SA-Block-Insertion-Image_Form1_SlideView4 "P:/SA-Drafting/Blocks/Slide_images/SA-DetailA.sld")
)
;*****************************************************************************************************************
;SlideView1
(defun c:SA-Block-Insertion-Image_Form1_SlideView1_OnDblClicked (/)
(dcl_Form_Close SA-Block-Insertion-Image_Form1)
(command "-insert" "SA-AnchorBolt" Pause "" "" Pause)
)
;*****************************************************************************************************************
;SlideView2
(defun c:SA-Block-Insertion-Image_Form1_SlideView2_OnDblClicked (/)
(dcl_Form_Close SA-Block-Insertion-Image_Form1)
(command "-insert" "SA-BoltNut" Pause "" "" Pause)
)
;*****************************************************************************************************************
;SlideView3
(defun c:SA-Block-Insertion-Image_Form1_SlideView3_OnDblClicked (/)
(dcl_Form_Close SA-Block-Insertion-Image_Form1)
(command "-insert" "SA-Centerline" Pause "" "" Pause)
)
;*****************************************************************************************************************
;SlideView4
(defun c:SA-Block-Insertion-Image_Form1_SlideView3_OnDblClicked (/)
(dcl_Form_Close SA-Block-Insertion-Image_Form1)
(command "-insert" "SA-DetailA" Pause "" "" Pause)
)

Kerry


Sounds to me like you have all your event traps in the editor pointing to  c:SA-Block-Insertion-Image_Form1_SlideView1_OnDblClicked
This can happen when you set up one control and copy it several times :)
Check that each event function is calling the required function. Toggle the event off and then on again to reset the function name.


... other than that I have no idea.
Perfection is not optional.
My other home is TheSwamp

owenwengerd

Quote from: Kerry Brown on March 24, 2010, 07:39:55 PM
Toggle the event off and then on again to reset the function name.

Or (in OpenDCl 6) use the new Tools -> Reset Event Names command.
Owen Wengerd (Outside The Box) / ManuSoft

Oak3s

 :D
WOW. I am pretty new huh. Thank you.

BazzaCAD

Quote from: owenwengerd on March 24, 2010, 08:01:14 PM
Or (in OpenDCl 6) use the new Tools -> Reset Event Names command.

Wow, you added that, cool thx.
Now I have to figure out why SF isn't notifying me...
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom

Fred Tomke

Yes, I noticed that in A24. It's a very good and needed tool for my ObjectDCL>OpenDCL transforming tasks.
Thanks, Owen.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]