Message 1 of 34
DCL List from Image Button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
I am working on a lsp that has a quick library for our day to day block design (we constantly result in many file paths to get to these so this would save a lot of time). The issue I am running across, however is when I select an image tile, I want to have a list populated of the blocks in that category. See image below for current DCL layout.
Temp has no function for now and I plan on keeping it that way
(Yes I know its messy right now.. just a draft)
This is my lisp code.
defun c:BTools (/ Dcl_Id% Folder$ Slides@ Slide1$ Slide2$ Slide3$ Slide4$ Return$ X# Y#)
(princ "\nBTOOLS")(princ)
; Set Default Variables
(setq Slides@ (list nil "Block Design" "Paper Space" "Plumbing" "WIP") ;; NAME OF THE .SLD FILE
Slide1$ (nth 1 Slides@)
Slide2$ (nth 2 Slides@)
Slide3$ (nth 3 Slides@)
Slide4$ (nth 4 Slides@)
Folder$ "C:\\...\\...\\Documents\\"
Return$ ""
);setq
; Load Dialog
(setq Dcl_Id% (load_dialog "MyDialogs.dcl"))
(new_dialog "MySlideImages" Dcl_Id%)
; Set Dialog Initial Settings
(set_tile "Title" " BTOOLS - TOOLS FOR DRAFTING")
(set_tile "Text1" Slide1$)
(set_tile "Text2" Slide2$)
(set_tile "Text3" Slide3$)
(set_tile "Text4" Slide4$)
; Adjust X# and Y# per image_buttom outline to fit slide_image
(start_image "Slide1")(setq X# (- (dimx_tile "Slide1") 2))
(setq Y# (- (dimy_tile "Slide1") 2))(end_image)
(start_image "Slide1")(slide_image -5 -4 X# Y# (strcat Folder$ Slide1$))(end_image)
(start_image "Slide2")(slide_image 1 1 X# Y# (strcat Folder$ Slide2$))(end_image)
(start_image "Slide3")(slide_image 1 1 X# Y# (strcat Folder$ Slide3$))(end_image)
(start_image "Slide4")(slide_image 1 1 X# Y# (strcat Folder$ Slide4$))(end_image)
; Dialog Actions
(action_tile "Slide1" "(setq Return$ Slide1$)")
(action_tile "Slide2" "(setq Return$ Slide2$)")
(action_tile "Slide3" "(setq Return$ Slide3$)")
(action_tile "Slide4" "(setq Return$ Slide4$)")
(start_dialog)
; Unload Dialog
(unload_dialog Dcl_Id%)
(princ (strcat "\n" Return$))
(princ)
)