DCL without halting AutoCAD (e
Hi all,I've been confidently programming in AutoLISP for a few years, but justnow 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 interactingwith the drawing? What I mean is, after I issue the (start_dialog)command my lisp function freezes until you close the DCL window. Is itnot possible to have that DCL dialog displayed and still have lisp coderunning?
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. 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 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 IMO, dcl will be unloaded once the routine is finish. 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))) 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.
页:
[1]