2010-03-25 23:40 UTC
My first OpenDCL project :)
I was wondering if there is an easier way of going about this. I have 100's of blocks and slides that I want to be able to insert from this application. I can (with the help of others here) load a slide and insert upon double click. The functions are very repetitive and if it is possible I would like to condense them. I didnt attach the BlockInsert function. This is the only part I have been able to condense. Any ideas?
[image attached]
I was wondering if there is an easier way of going about this. I have 100's of blocks and slides that I want to be able to insert from this application. I can (with the help of others here) load a slide and insert upon double click. The functions are very repetitive and if it is possible I would like to condense them. I didnt attach the BlockInsert function. This is the only part I have been able to condense. Any ideas?
[image attached]
(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") ;SlideView1
(dcl_SlideView_Load SA-Block-Insertion-Image_Form1_SlideView2 "P:/SA-Drafting/Blocks/Slide_images/SA-BoltNut.sld") ;SlideView2
(dcl_SlideView_Load SA-Block-Insertion-Image_Form1_SlideView3 "P:/SA-Drafting/Blocks/Slide_images/SA-Centerline.sld") ;SlideView3
(dcl_SlideView_Load SA-Block-Insertion-Image_Form1_SlideView4 "P:/SA-Drafting/Blocks/Slide_images/SA-DetailA.sld") ;SlideView4
(dcl_SlideView_Load SA-Block-Insertion-Image_Form1_SlideView5 "P:/SA-Drafting/Blocks/Slide_images/SA-DetailNotUsed.sld") ;SlideView5
(dcl_SlideView_Load SA-Block-Insertion-Image_Form1_SlideView6 "P:/SA-Drafting/Blocks/Slide_images/SA-DryPack.sld") ;SlideView6
(dcl_SlideView_Load SA-Block-Insertion-Image_Form1_SlideView7 "P:/SA-Drafting/Blocks/Slide_images/SA-Earth.sld") ;SlideView7
(dcl_SlideView_Load SA-Block-Insertion-Image_Form1_SlideView8 "P:/SA-Drafting/Blocks/Slide_images/SA-ExpansionBolt.sld") ;SlideView8
)
;*****************************************************************************************************************
;SlideView1
(defun c:SA-Block-Insertion-Image_Form1_SlideView1_OnMouseEntered (/)
(dcl_Control_SetFocus SA-Block-Insertion-Image_Form1_SlideView1)
(dcl_Control_SetCaption SA-Block-Insertion-Image_Form1_Label1 "Anchor Bolt")
)
(defun c:SA-Block-Insertion-Image_Form1_SlideView1_OnDblClicked (/)
(setq BName "SA-Anchorbolt" Xplod "1")
(BlockInsert)
)
;*****************************************************************************************************************
;SlideView2
(defun c:SA-Block-Insertion-Image_Form1_SlideView2_OnMouseEntered (/)
(dcl_Control_SetFocus SA-Block-Insertion-Image_Form1_SlideView2)
(dcl_Control_SetCaption SA-Block-Insertion-Image_Form1_Label1 "Bolt Nut")
)
(defun c:SA-Block-Insertion-Image_Form1_SlideView2_OnDblClicked (/)
(setq BName "SA-BoltNut" Xplod "1")
(BlockInsert)
)