Russello Posted October 21, 2017 Share Posted October 21, 2017 Hello again Masters and Legends, I'm currently learning DCL right now thru Afralisp.net and some autodesk forum topics. From their examples, a DCL file is paired with a LSP file to work. For example, I have a DCL and its pair LSP file, its function is just to collect names, some numbers, places, (and any other data). Is it possible that any other LSP routine can use the data stored/inputted on the DCL? If it is, how? I just dont know. Thanks again. more power! Quote Link to comment Share on other sites More sharing options...
dan113 Posted October 21, 2017 Share Posted October 21, 2017 Any value you store in a variable is available as long as you do not localise it. I use opendcl for all my dialog boxes it's much faster and flexible. Sent from my Pixel XL using Tapatalk Quote Link to comment Share on other sites More sharing options...
Grrr Posted October 21, 2017 Share Posted October 21, 2017 You could create a DCL file on-the-fly from the lisp code, load and start the dialog, then collect the required input and close the dialog and erase the temporary dcl file. Heres an example: (defun C:test ( / dcl des dch dcf rtn ) ;; Example to create DCL on-the-fly and gather input(s) ;; Modified version, original by: Lee Mac (defun *error* ( msg ) (and (< 0 dch) (unload_dialog dch)) (and (eq 'FILE (type des)) (close des)) (and (eq 'STR (type dcl)) (findfile dcl) (vl-file-delete dcl)) (and msg (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\nError: " msg)))) (princ) ); defun *error* (and (setq dcl (vl-filename-mktemp nil nil ".dcl")) (setq des (open dcl "w")) (princ (strcat "test : dialog" "{ label = \"Get String\";" " : column" " { children_alignment = centered;" " : text { value = \"Your input: \"; }" " : edit_box { key = \"eb\"; edit_width = 26; }" " }" " spacer_1; ok_cancel;" "}" ); strcat des ) (not (setq des (close des))) (< 0 (setq dch (load_dialog dcl))) (new_dialog "test" dch) (action_tile "eb" "(setq rtn $value)") (= 1 (setq dcf (start_dialog))) (princ rtn) ); and (*error* nil) (princ) ); defun C:test Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 21, 2017 Share Posted October 21, 2017 (edited) Like Grr there are examples here for on the fly DCL for LIST selection check Lee-mac.com I have a 1 2 3 enter values dcl, the thing here is that you supply the text message request, another is an unlimited version of the 123 only limited by a practical screen limit. ; this is all that is needed for a 3 value request 2 lines of code ; its version 2 as it also has default values so you can just go OK (if (not AH:GETVAL3)(load "getvals3")) (ah:getval3 "Enter Hor scale" 5 4 "100" "Enter Ver Scale" 5 4 "50" "Enter Dec places" 5 4 "2") GETVALS3.lsp Edited October 22, 2017 by BIGAL Quote Link to comment Share on other sites More sharing options...
Russello Posted October 22, 2017 Author Share Posted October 22, 2017 Hello Master dan113, Grrr, & BIGAL ! Thank you again for your insights and for always answering in my threads. I will try my best to digest these things. dan113, im currently reading the tutorials for opendcl. wish me luck. hehehe Thank you again my Masters Kind Regards, Russello Quote Link to comment Share on other sites More sharing options...
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.