OnDblClicked SlideView

Started by Oak3s · 2010-03-25 01:43 UTC · 5 replies · SMF topic #1234

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)
)

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.
author=Kerry Brown link=topic=1234.msg6603#msg6603 date=1269484795 wrote:
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.
:D
WOW. I am pretty new huh. Thank you.
author=owenwengerd link=topic=1234.msg6604#msg6604 date=1269486074 wrote:
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...
Yes, I noticed that in A24. It's a very good and needed tool for my ObjectDCL>OpenDCL transforming tasks.
Thanks, Owen.

Fred