OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Oak3s on March 24, 2010, 06:43:51 PM

Title: OnDblClicked SlideView
Post by: Oak3s on March 24, 2010, 06:43:51 PM
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)
)
Title: Re: OnDblClicked SlideView
Post by: Kerry on March 24, 2010, 07:39:55 PM

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.
Title: Re: OnDblClicked SlideView
Post by: owenwengerd on March 24, 2010, 08:01:14 PM
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.
Title: Re: OnDblClicked SlideView
Post by: Oak3s on March 25, 2010, 11:56:33 AM
 :D
WOW. I am pretty new huh. Thank you.
Title: Re: OnDblClicked SlideView
Post by: BazzaCAD on March 25, 2010, 09:18:18 PM
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...
Title: Re: OnDblClicked SlideView
Post by: Fred Tomke on March 25, 2010, 10:38:47 PM
Yes, I noticed that in A24. It's a very good and needed tool for my ObjectDCL>OpenDCL transforming tasks.
Thanks, Owen.

Fred