cadmando2 Posted May 31, 2022 Posted May 31, 2022 (edited) I am looking create my first lisp and DCL. I know it is a little complex but it is something similar to sheet set. Like a Project manager for AutoCAD. Title Block entre, revision control and data link with excel. What I am having trouble with is needing mutable tabs But I am not finding what others have done or even trying to find “Osnap or Dimstyle” to see how DCL code is written. I can’t find the Osnap or Dimstyle DCL file in AutoCAD directory? Edited May 31, 2022 by cadmando2 Quote
ronjonp Posted May 31, 2022 Posted May 31, 2022 Don't think that is DCL. You might take a look at OpenDCL, it's a bit more advanced. Quote
BIGAL Posted June 1, 2022 Posted June 1, 2022 (edited) I just use inbuilt dcl not opendcl as most of my work goes to others so that is an extra install by the end user. But it is very good. I think what you want there is what is known as a Button in dcl this in turn can open a "CHILD" dcl, in image below size has been clicked, the size dcl has sliders, input values, and a total, change any option and total width is updated. Edited June 1, 2022 by BIGAL Quote
Steven P Posted June 1, 2022 Posted June 1, 2022 I saw this similar once -kind of- with plain DCL where selecting a different tab closed the DCL and opened a new DCL showing those tab options, I think the tabs at the top were images with different background colours, lighter or darker to show which was selected. Quote
cadmando2 Posted June 6, 2022 Author Posted June 6, 2022 I am hopping someone has done something similar that can help! Quote
BIGAL Posted June 6, 2022 Posted June 6, 2022 Did you google opendcl tabs, I glanced in the opendcl forum and this subject was up near top of opendcl & lisp Quote
SLW210 Posted June 7, 2022 Posted June 7, 2022 IIRC, you can do Tabs in a VBA User Form. Like mentioned, OpenDCL, but needs installed on all machines, which may not be a big deal or could be a show stopper. As mentioned AutoCAD DCL doesn't do tabs, you will have to fake it, plain and simple. Go HERE and check out DCL_Tiles 1 1 Quote
cadmando2 Posted June 7, 2022 Author Posted June 7, 2022 5 hours ago, SLW210 said: IIRC, you can do Tabs in a VBA User Form. Like mentioned, OpenDCL, but needs installed on all machines, which may not be a big deal or could be a show stopper. As mentioned AutoCAD DCL doesn't do tabs, you will have to fake it, plain and simple. Go HERE and check out DCL_Tiles There run the lisp and dcl file and gives me a "vector_text syntax error: Values for X and Y must be a positive number.; error: quit / exit abort" error Quote
Leika Posted June 10, 2022 Posted June 10, 2022 Quote I am looking create my first lisp and DCL. If the layout is also important to you and making it very functional/comprehensible for the user, OpenDCL is a gift ! The possibilities are limitless - Let me know if you need example! I'm just working on a stair section... Quote
SLW210 Posted June 13, 2022 Posted June 13, 2022 On 6/7/2022 at 3:24 PM, cadmando2 said: There run the lisp and dcl file and gives me a "vector_text syntax error: Values for X and Y must be a positive number.; error: quit / exit abort" error I have no idea what you are asking? On 6/10/2022 at 4:38 PM, Leika said: If the layout is also important to you and making it very functional/comprehensible for the user, OpenDCL is a gift ! The possibilities are limitless - Let me know if you need example! I'm just working on a stair section... Like stated, it needs installed on all users machines AFAIK. That is a show stopper where I work. VBA is a very fast learning curve usually, very easy for TABS as well. The LISP examples shown previous look very nice. Quote
cadmando2 Posted June 13, 2022 Author Posted June 13, 2022 Thanks for the Help, but I am just going trying figure it out someway! maybe it to complex for anyone! not a big deal, just though it would be a fun project! Quote
Steven P Posted June 13, 2022 Posted June 13, 2022 Bit of a work in progress as an example of the principle I mentioned above using LISP / DCL. Another of those questions which is something I have been meaning to make up for something else ages ago Still need to get swapping between tabs going properly, it is limnited (by AutoCAD) to 8 'children'; but see what you think. Works by opening another dialogue box on top of the original, and when you cancel / accept that cascades through them all closing all the dialogue boxes. Next task for me is to remember where I saw the instruction on closing them opening dialogue boxes - think I have that in my brain somewhere - to remove the limitation of children (defun c:testthis ( / ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun Tab1 ( / dcl1 des1 dch1 x) ;;;DCL 1 ;;DCL on the fly: Ideas by Lee Mac and Cadtutor forums ;;create DCL pop up box (if (and (setq dcl1 (strcat (getvar "TEMPPREFIX") "DCLTab1.dcl")) (setq des1 (open dcl1 "w")) (foreach x '( " pass : dialog" " {" " key = \"Lispdialoguebox\";" " label = \"A Dialogue Box\";" " spacer;" " : column { width=80;" " : row {" " : button { key = \"Tab1\"; label = \"Tab1\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab2\"; label = \"Tab2\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab3\"; label = \"Tab3\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab4\"; label = \"Tab4\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " spacer;" " }" " }" " : boxed_column { width=80; label = \"A TITLE HERE 'Tab 1'\";" " : row { width=80; alignment = centered;" " : column {width = 20; alignment = centered;" " :row {alignment = bottom;" " : text { key = \"text1-a\"; label = \"Lets Make DCL!\"; width = 20; alignment = right;}" " }" " : row {width = 40; alignment = left;" " : text { key = \"text1-b\"; label = \"and put all the fun bits here\"; width = 20; alignment = right;}" " }" " }" " }" " }" " : boxed_column { width=80; alignment = left;" " : row {" " : column {width = 18; alignment = centered;" " : button { key = \"accept\"; label = \"OK\"; is_default = true; is_cancel = true; fixed_width = true; width = 15; }" " }" " : column {width = 18; alignment = centered;" " : button { key = \"cancel\"; label = \"Cancel\"; is_default = false; is_cancel = true; fixed_width = true; width = 15; }" " }" " }" " }" " }" ) (write-line x des1) ) (not (setq des1 (close des1))) (< 0 (setq dch1 (load_dialog dcl1))) (new_dialog "pass" dch1) ) ;;End of DCL pop up box definition (progn ;;makes a pop-up list box (action_tile "Tab2" "(Tab2)(done_dialog 1)") (action_tile "Tab3" "(Tab3)(done_dialog 1)") (action_tile "Tab4" "(Tab4)(done_dialog 1)") (action_tile "accept" "(done_dialog 1)") (action_tile "cancel" "(done_dialog 0)") (start_dialog) ) ;;end of DCL1 'and' above (princ "\nError. Unable to load dialogue box.") ) ;;end of DCL1 'if' above (vl-file-delete dcl1) ;;delete the temp DCL file ) ; end defun tab 1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun Tab2 ( / dcl2 des2 dch2 x) (if (and (setq dcl2 (strcat (getvar "TEMPPREFIX") "DCLTab2.dcl")) (setq des2 (open dcl2 "w")) (foreach x '( " pass : dialog" " {" " key = \"Lispdialoguebox\";" " label = \"Popped Up to say Hello\";" " spacer;" " : column { width=80;" " : row {" " : button { key = \"Tab1\"; label = \"Tab1\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab2\"; label = \"Tab2\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab3\"; label = \"Tab3\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab4\"; label = \"Tab4\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " spacer;" " }" " }" " : boxed_column { width=80; label = \"A TITLE HERE 'Tab 2'\";" " : row { width=80; alignment = centered;" " : column {width = 20; alignment = centered;" " :row {alignment = bottom;" " : text { key = \"text1-a\"; label = \"Aha!! Tab 2!!\"; width = 20; alignment = right;}" " }" " : row {width = 40; alignment = left;" " : text { key = \"text1-b\"; label = \"put more fun bits here\"; width = 20; alignment = right;}" " }" " }" " }" " }" " : boxed_column { width=80; alignment = left;" " : row {" " : column {width = 18; alignment = centered;" " : button { key = \"accept\"; label = \"OK\"; is_default = true; is_cancel = true; fixed_width = true; width = 15; }" " }" " : column {width = 18; alignment = centered;" " : button { key = \"cancel\"; label = \"Cancel\"; is_default = false; is_cancel = true; fixed_width = true; width = 15; }" " }" " }" " }" " }" ) (write-line x des2) ) (not (setq des2 (close des2))) (< 0 (setq dch2 (load_dialog dcl2))) (new_dialog "pass" dch2) (princ "Tab 2 Loaded") ) ;;End of DCL pop up box definition (progn ;;makes a pop-up list box (action_tile "Tab1" "(Tab1)(done_dialog 1)") (action_tile "Tab3" "(Tab3)(done_dialog 1)") (action_tile "Tab4" "(Tab4)(done_dialog 1)") (action_tile "accept" "(done_dialog 1)") (action_tile "cancel" "(done_dialog 0)") (start_dialog) ) ;;end of DCL2 'and' above (princ "\nError. Unable to load dialogue box.") ) ;;end of DCL2 'if' above (vl-file-delete dcl2) ;;delete the temp DCL file ) ; end defun tab 2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun Tab3 ( / dcl3 des3 dch3 x) (if (and (setq dcl3 (strcat (getvar "TEMPPREFIX") "DCLTab3.dc3")) (setq des3 (open dcl3 "w")) (foreach x '( " pass : dialog" " {" " key = \"Lispdialoguebox\";" " label = \"The popped away again\";" " spacer;" " : column { width=80;" " : row {" " : button { key = \"Tab1\"; label = \"Tab1\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab2\"; label = \"Tab2\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab3\"; label = \"Tab3\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab4\"; label = \"Tab4\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " spacer;" " }" " }" " : boxed_column { width=80; label = \"A TITLE HERE 'Tab 3'\";" " : row { width=80; alignment = centered;" " : column {width = 20; alignment = centered;" " :row {alignment = bottom;" " : text { key = \"text1-a\"; label = \"Now your talking, Tab 3!!\"; width = 20; alignment = right;}" " }" " : row {width = 40; alignment = left;" " : text { key = \"text1-b\"; label = \"good this,\"; width = 20; alignment = right;}" " }" " }" " }" " }" " : boxed_column { width=80; alignment = left;" " : row {" " : column {width = 18; alignment = centered;" " : button { key = \"accept\"; label = \"OK\"; is_default = true; is_cancel = true; fixed_width = true; width = 15; }" " }" " : column {width = 18; alignment = centered;" " : button { key = \"cancel\"; label = \"Cancel\"; is_default = false; is_cancel = true; fixed_width = true; width = 15; }" " }" " }" " }" " }" ) (write-line x des3) ) (not (setq des3 (close des3))) (< 0 (setq dch3 (load_dialog dcl3))) (princ "Tab 3 Loaded") (new_dialog "pass" dch3) ) ;;End of DCL pop up box definition (progn ;;makes a pop-up list box (action_tile "Tab1" "(Tab1)(done_dialog 1)") (action_tile "Tab2" "(Tab2)(done_dialog 1)") (action_tile "Tab4" "(Tab4)(done_dialog 1)") (action_tile "accept" "(done_dialog 1)") (action_tile "cancel" "(done_dialog 0)") (start_dialog) ) ;;end of DCL3 'and' above (princ "\nError. Unable to load dialogue box.") ) ;;end of DCL3 'if' above (vl-file-delete dcl3) ;;delete the temp DCL file ) ; end defun tab 3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun Tab4 ( / dcl4 des4 dch4 x) (if (and (setq dcl4 (strcat (getvar "TEMPPREFIX") "DCLTab4.dcl")) (setq des4 (open dcl4 "w")) (foreach x '( " pass : dialog" " {" " key = \"Lispdialoguebox\";" " label = \"This is Tab 4 by the way\";" " spacer;" " : column { width=80;" " : row {" " : button { key = \"Tab1\"; label = \"Tab1\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab2\"; label = \"Tab2\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab3\"; label = \"Tab3\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab4\"; label = \"Tab4\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " spacer;" " }" " }" " : boxed_column { width=80; label = \"A TITLE HERE 'Tab 4'\";" " : row { width=80; alignment = centered;" " : column {width = 20; alignment = centered;" " :row {alignment = bottom;" " : text { key = \"text1-a\"; label = \"Look who'se talkng!!\"; width = 20; alignment = right;}" " }" " : row {width = 40; alignment = left;" " : text { key = \"text1-b\"; label = \"to you. Anopther Tab!!\"; width = 20; alignment = right;}" " }" " }" " }" " }" " : boxed_column { width=80; alignment = left;" " : row {" " : column {width = 18; alignment = centered;" " : button { key = \"accept\"; label = \"OK\"; is_default = true; is_cancel = true; fixed_width = true; width = 15; }" " }" " : column {width = 18; alignment = centered;" " : button { key = \"cancel\"; label = \"Cancel\"; is_default = false; is_cancel = true; fixed_width = true; width = 15; }" " }" " }" " }" " }" ) (write-line x des4) ) (not (setq des4 (close des4))) (< 0 (setq dch4 (load_dialog dcl4))) (princ "Tab 4 Loaded") (new_dialog "pass" dch4) ) ;;End of DCL pop up box definition (progn ;;makes a pop-up list box (action_tile "Tab1" "(Tab1)(term_dialog)(done_dialog 1)") (action_tile "Tab2" "(Tab2)(term_dialog)(done_dialog 1)") (action_tile "Tab3" "(Tab3)(term_dialog)(done_dialog 1)") (action_tile "accept" "(done_dialog 1)(term_dialog)") (action_tile "cancel" "(done_dialog 0)(term_dialog)") (start_dialog) ) ;;end of DCL4 'and' above (princ "\nError. Unable to load dialogue box.") ) ;;end of DCL4 'if' above (vl-file-delete dcl4) ;;delete the temp DCL file ) ; end defun tab 4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (Tab1) (princ) ) Quote
BIGAL Posted June 13, 2022 Posted June 13, 2022 I dont do it use child dcl but if temporary close a dcl the main thing would be to save all the relevant variable values, so when reopen can set them back again. You can call defuns as part of a "action tile" so would have all the get action tiles in a defun much easier to work out what is going on. 1 Quote
Steven P Posted June 14, 2022 Posted June 14, 2022 I don't nest them much either, but without installing and using something like OpenDCL this is the best way for the OP to get near what they want using plain LISP and DCL I think though not as nice looking Quote
BIGAL Posted June 15, 2022 Posted June 15, 2022 Not sure why you are going 8 child deep I have 17 buttons each has 1 child. BOLT STEEL GRADE SIZE LENGTH would be 4 deep but would be better done with a better dcl. Quote
Steven P Posted June 15, 2022 Posted June 15, 2022 8 hours ago, BIGAL said: Not sure why you are going 8 child deep I have 17 buttons each has 1 child. BOLT STEEL GRADE SIZE LENGTH would be 4 deep but would be better done with a better dcl. 8 Children is the limit by AutoCAD. I saved my example away but changed it to close the first and open a new one, getting rid of the children thing Quote
Steven P Posted June 16, 2022 Posted June 16, 2022 Coming back to this one again, this version uses the same idea I had above but closes each dialogue box and opens a new one which gets past the 8 children problem There are 4 defuns in this, one for each tab (create more or less as you want), and currently they return the variable 'MyTab'. If you want to keep any variables entered into a dialogue I would have 'MyTab' as a list, the first item being the selected next tab to go to, and after that include in the list all the other variables, perhaps for the full dialogue box, and update that as the user selects controls. Am sure you can work out passing numbers backwards and forwards and repopulating the dialogue boxes with that. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun Tab1 ( / dcl1 des1 dch1 x MyTab) ;;;DCL 1 ;;DCL on the fly: Ideas by Lee Mac and Cadtutor forums ;;create DCL pop up box (if (and (setq dcl1 (strcat (getvar "TEMPPREFIX") "DCLTab1.dcl")) (setq des1 (open dcl1 "w")) (foreach x '( " pass : dialog" " {" " key = \"Lispdialoguebox\";" " label = \"A Dialogue Box\";" " spacer;" " : column { width=80;" " : row {" " : button { key = \"Tab1\"; label = \"Tab1\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab2\"; label = \"Tab2\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab3\"; label = \"Tab3\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab4\"; label = \"Tab4\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " spacer;" " }" " }" " : boxed_column { width=80; label = \"A TITLE HERE 'Tab 1'\";" " : row { width=80; alignment = centered;" " : column {width = 20; alignment = centered;" " :row {alignment = bottom;" " : text { key = \"text1-a\"; label = \"Lets Make DCL!\"; width = 20; alignment = right;}" " }" " : row {width = 40; alignment = left;" " : text { key = \"text1-b\"; label = \"and put all the fun bits here\"; width = 20; alignment = right;}" " }" " }" " }" " }" " : boxed_column { width=80; alignment = left;" " : row {" " : column {width = 18; alignment = centered;" " : button { key = \"accept\"; label = \"OK\"; is_default = true; is_cancel = true; fixed_width = true; width = 15; }" " }" " : column {width = 18; alignment = centered;" " : button { key = \"cancel\"; label = \"Cancel\"; is_default = false; is_cancel = true; fixed_width = true; width = 15; }" " }" " }" " }" " }" ) (write-line x des1) ) (not (setq des1 (close des1))) (< 0 (setq dch1 (load_dialog dcl1))) (new_dialog "pass" dch1) ) ;;End of DCL pop up box definition (progn ;;makes a pop-up list box (action_tile "Tab1" "(Setq MyTab \"Tab1\")(term_dialog)(done_dialog 1)") (action_tile "Tab2" "(Setq MyTab \"Tab2\")(term_dialog)(done_dialog 1)") (action_tile "Tab3" "(Setq MyTab \"Tab3\")(term_dialog)(done_dialog 1)") (action_tile "Tab4" "(Setq MyTab \"Tab4\")(term_dialog)(done_dialog 1)") (action_tile "accept" "(done_dialog 1)(term_dialog)") (action_tile "cancel" "(done_dialog 0)(term_dialog)") (start_dialog) ) ;;end of DCL1 'and' above (princ "\nError. Unable to load dialogue box.") ) ;;end of DCL1 'if' above (vl-file-delete dcl1) ;;delete the temp DCL file MyTab ) ; end defun tab 1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun Tab2 ( / dcl2 des2 dch2 x MyTab) (if (and (setq dcl2 (strcat (getvar "TEMPPREFIX") "DCLTab2.dcl")) (setq des2 (open dcl2 "w")) (foreach x '( " pass : dialog" " {" " key = \"Lispdialoguebox\";" " label = \"Popped Up to say Hello\";" " spacer;" " : column { width=80;" " : row {" " : button { key = \"Tab1\"; label = \"Tab1\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab2\"; label = \"Tab2\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab3\"; label = \"Tab3\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab4\"; label = \"Tab4\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " spacer;" " }" " }" " : boxed_column { width=80; label = \"A TITLE HERE 'Tab 2'\";" " : row { width=80; alignment = centered;" " : column {width = 20; alignment = centered;" " :row {alignment = bottom;" " : text { key = \"text1-a\"; label = \"Aha!! Tab 2!!\"; width = 20; alignment = right;}" " }" " : row {width = 40; alignment = left;" " : text { key = \"text1-b\"; label = \"put more fun bits here\"; width = 20; alignment = right;}" " }" " }" " }" " }" " : boxed_column { width=80; alignment = left;" " : row {" " : column {width = 18; alignment = centered;" " : button { key = \"accept\"; label = \"OK\"; is_default = true; is_cancel = true; fixed_width = true; width = 15; }" " }" " : column {width = 18; alignment = centered;" " : button { key = \"cancel\"; label = \"Cancel\"; is_default = false; is_cancel = true; fixed_width = true; width = 15; }" " }" " }" " }" " }" ) (write-line x des2) ) (not (setq des2 (close des2))) (< 0 (setq dch2 (load_dialog dcl2))) (new_dialog "pass" dch2) (princ "Tab 2 Loaded") ) ;;End of DCL pop up box definition (progn ;;makes a pop-up list box (action_tile "Tab1" "(Setq MyTab \"Tab1\")(term_dialog)(done_dialog 1)") (action_tile "Tab2" "(Setq MyTab \"Tab2\")(term_dialog)(done_dialog 1)") (action_tile "Tab3" "(Setq MyTab \"Tab3\")(term_dialog)(done_dialog 1)") (action_tile "Tab4" "(Setq MyTab \"Tab4\")(term_dialog)(done_dialog 1)") (action_tile "accept" "(done_dialog 1)(term_dialog)") (action_tile "cancel" "(done_dialog 0)(term_dialog)") (start_dialog) ) ;;end of DCL2 'and' above (princ "\nError. Unable to load dialogue box.") ) ;;end of DCL2 'if' above (vl-file-delete dcl2) ;;delete the temp DCL file MyTab ) ; end defun tab 2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun Tab3 ( / dcl3 des3 dch3 x MyTab) (if (and (setq dcl3 (strcat (getvar "TEMPPREFIX") "DCLTab3.dc3")) (setq des3 (open dcl3 "w")) (foreach x '( " pass : dialog" " {" " key = \"Lispdialoguebox\";" " label = \"The popped away again\";" " spacer;" " : column { width=80;" " : row {" " : button { key = \"Tab1\"; label = \"Tab1\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab2\"; label = \"Tab2\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab3\"; label = \"Tab3\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab4\"; label = \"Tab4\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " spacer;" " }" " }" " : boxed_column { width=80; label = \"A TITLE HERE 'Tab 3'\";" " : row { width=80; alignment = centered;" " : column {width = 20; alignment = centered;" " :row {alignment = bottom;" " : text { key = \"text1-a\"; label = \"Now your talking, Tab 3!!\"; width = 20; alignment = right;}" " }" " : row {width = 40; alignment = left;" " : text { key = \"text1-b\"; label = \"good this,\"; width = 20; alignment = right;}" " }" " }" " }" " }" " : boxed_column { width=80; alignment = left;" " : row {" " : column {width = 18; alignment = centered;" " : button { key = \"accept\"; label = \"OK\"; is_default = true; is_cancel = true; fixed_width = true; width = 15; }" " }" " : column {width = 18; alignment = centered;" " : button { key = \"cancel\"; label = \"Cancel\"; is_default = false; is_cancel = true; fixed_width = true; width = 15; }" " }" " }" " }" " }" ) (write-line x des3) ) (not (setq des3 (close des3))) (< 0 (setq dch3 (load_dialog dcl3))) (princ "Tab 3 Loaded") (new_dialog "pass" dch3) ) ;;End of DCL pop up box definition (progn ;;makes a pop-up list box (action_tile "Tab1" "(Setq MyTab \"Tab1\")(term_dialog)(done_dialog 1)") (action_tile "Tab2" "(Setq MyTab \"Tab2\")(term_dialog)(done_dialog 1)") (action_tile "Tab3" "(Setq MyTab \"Tab3\")(term_dialog)(done_dialog 1)") (action_tile "Tab4" "(Setq MyTab \"Tab4\")(term_dialog)(done_dialog 1)") (action_tile "accept" "(done_dialog 1)(term_dialog)") (action_tile "cancel" "(done_dialog 0)(term_dialog)") (start_dialog) ) ;;end of DCL3 'and' above (princ "\nError. Unable to load dialogue box.") ) ;;end of DCL3 'if' above (vl-file-delete dcl3) ;;delete the temp DCL file MyTab ) ; end defun tab 3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun Tab4 ( / dcl4 des4 dch4 x MyTab) (if (and (setq dcl4 (strcat (getvar "TEMPPREFIX") "DCLTab4.dcl")) (setq des4 (open dcl4 "w")) (foreach x '( " pass : dialog" " {" " key = \"Lispdialoguebox\";" " label = \"This is Tab 4 by the way\";" " spacer;" " : column { width=80;" " : row {" " : button { key = \"Tab1\"; label = \"Tab1\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab2\"; label = \"Tab2\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab3\"; label = \"Tab3\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " : button { key = \"Tab4\"; label = \"Tab4\"; is_default = false; is_cancel = true; fixed_width = true; width = 20;}" " spacer;" " }" " }" " : boxed_column { width=80; label = \"A TITLE HERE 'Tab 4'\";" " : row { width=80; alignment = centered;" " : column {width = 20; alignment = centered;" " :row {alignment = bottom;" " : text { key = \"text1-a\"; label = \"Look who'se talkng!!\"; width = 20; alignment = right;}" " }" " : row {width = 40; alignment = left;" " : text { key = \"text1-b\"; label = \"to you. Anopther Tab!!\"; width = 20; alignment = right;}" " }" " }" " }" " }" " : boxed_column { width=80; alignment = left;" " : row {" " : column {width = 18; alignment = centered;" " : button { key = \"accept\"; label = \"OK\"; is_default = true; is_cancel = true; fixed_width = true; width = 15; }" " }" " : column {width = 18; alignment = centered;" " : button { key = \"cancel\"; label = \"Cancel\"; is_default = false; is_cancel = true; fixed_width = true; width = 15; }" " }" " }" " }" " }" ) (write-line x des4) ) (not (setq des4 (close des4))) (< 0 (setq dch4 (load_dialog dcl4))) (princ "Tab 4 Loaded") (new_dialog "pass" dch4) ) ;;End of DCL pop up box definition (progn ;;makes a pop-up list box (action_tile "Tab1" "(Setq MyTab \"Tab1\")(done_dialog 1)") (action_tile "Tab2" "(Setq MyTab \"Tab2\")(done_dialog 1)") (action_tile "Tab3" "(Setq MyTab \"Tab3\")(done_dialog 1)") (action_tile "Tab4" "(Setq MyTab \"Tab4\")(done_dialog 1)") (action_tile "accept" "(done_dialog 1)") (action_tile "cancel" "(done_dialog 0)") (start_dialog) ) ;;end of DCL4 'and' above (princ "\nError. Unable to load dialogue box.") ) ;;end of DCL4 'if' above (vl-file-delete dcl4) ;;delete the temp DCL file MyTab ;;change this to a list with all variables in it. Repopulate tab when it is opened again ) ; end defun tab 4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun c:testthis ( / ) (setq MyTab (Tab1)) (setq Done "Not") (while (= Done "Not") (if (= MyTab nil)(setq Done "Yes")) (if (/= MyTab nil)(setq MyTab (eval (read (strcat "(" MyTab ")"))) ) ) ); end while 2 Quote
cadmando2 Posted June 17, 2022 Author Posted June 17, 2022 Thanks Steve. Fiend of mine ask why I was trying such a big task as a Project Manager for my first lisp routine? Told him, I wrote few small lisp routines, but it a challenge and no one is done this type of lisp routine!! After 40 years of working with AutoCAD and creating scripts and modifying some lisp routines, I wanted to create my own PM lisp routine fore years. Never had the time. Now I have some time between work projects I am working on this lisp routine with some help! Thanks again for your help. I might need some feel back once I finish the lisp routine! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.