tmo793 Posted April 8, 2015 Posted April 8, 2015 Hi all, I've been confidently programming in AutoLISP for a few years, but just now started dipping my toes into DCL. I have a quick question, because I think I've misunderstood what DCL can do for me. Is it possible to have a DCL dialog displayed, and still be interacting with the drawing? What I mean is, after I issue the (start_dialog) command my lisp function freezes until you close the DCL window. Is it not possible to have that DCL dialog displayed and still have lisp code running? An example of what I'd thought was possible: 1. User starts command MYCMD 2. Dialog box appears, with the text "you haven't clicked yet" 3. User clicks a point on the drawing 4. Dialog box text changes to "you clicked on (X,Y)" 5. Loop back to #3, until user exits MYCMD 6. Close dialog box PS Yes, I understand the above is more easily done with (princ)'s or (grtext)'s, I'm just wanting to learn DCL capabilities. Quote
Lee Mac Posted April 8, 2015 Posted April 8, 2015 Welcome to CADTutor Standard DCL does not support modeless dialogs (only modal), and so unfortunately this is not possible. If you wish to continue using AutoLISP for this task, you would need to look into using third-party software, such as OpenDCL or ObjectDCL. Lee Quote
tmo793 Posted April 8, 2015 Author Posted April 8, 2015 Cheers Lee - disappointing, but at least I have confirmation of it. Actually, for my simple project, I think I'm just going to bail out of using a DCL-like interface altogether, and just use (grread) coupled with your neat (LM:grtext) code (which is far better suited to what I need than the built-in (grtext) i mentioned earlier) So, double-cheers then Quote
ttray33y Posted April 8, 2015 Posted April 8, 2015 IMO, dcl will be unloaded once the routine is finish. Quote
BIGAL Posted April 9, 2015 Posted April 9, 2015 KISS keep it simple s..... (setq pt (getpoint "pick point")) (setq x (car pt) Y (cadr pt) Z (caddr pt) ) (alert (strcat "you have picked " (rtos X 2 2) "," (rtos Y 2 2))) Quote
neophoible Posted April 10, 2015 Posted April 10, 2015 Well, yes, you can do what you are talking about with DCL, though it may not be a truly modeless way. And note that, in general, you don't want dialog boxes blocking the screen while the user is trying to pick a point anyway. Here is the link to a quick tutorial on "hiding" the dialog box: http://www.afralisp.net/dialog-control-language/tutorials/hiding-dialog-boxes.php. You can even nest dialogs. There's a link to that on the above webpage. 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.