Macro - after dialog box, can&
Yo folks,trying to automate a bunch of commands with a macro but can't get the last UNDO to run and can't figure out why.
the macro is as follows:
The macro stops after I return back from the dialoge box where I choose where to put the PartContent, then it should end with Undo/Back but it doesn't! Anyone know why? So I got it working, I had too many enters and slashes. But I can add another question. The first Erase is there for me to remove 2 lines. It works fine if I hit both lines with one klick each. But if I miss the lines and start a crossing box instead, the command doesn't care. I get to clicks and that is it. Can I make this more user-friendly somehow?
Use the SELECT command with a single pause (since for the SELECT command, AutoCAD will pause until the selection is completed), and then call the Previous selection set to be erased. Ahhh, smrt
........... ....... I have one more question. More a pondering really. A musing if you will.
If I run the commands in the macro by hand, the last thing I see is : Undo Mark encountered. Must enter UNDO END to go back further.
If I run the button though, I get: Start of Group encountered. Must enter UNDO END to go back further.
Why is that? It does the same thing, it goes back to the same place. Just weird.
BTw - UNDO Mark is a marvoulousousloussu thing. Why didn't I know about it sooner?! It could be because you already have the things your working on selected maybe. No clue. As long as it works I guess.
Sounds like you are starting a new Undo Group without first closing any Undo Groups which are already open - or, in other words, not closing an open Undo Group before opening another.
I would suggest adding an Undo End before starting the new Undo Mark.
In LISP, I use the following functions for this purpose:
;; Start Undo-Lee Mac;; Opens an Undo Group.(defun LM:startundo ( doc ) (LM:endundo doc) (vla-startundomark doc));; End Undo-Lee Mac;; Closes an Undo Group.(defun LM:endundo ( doc ) (while (= 8 (logand 8 (getvar 'undoctl))) (vla-endundomark doc) )) Hm. So let's say I keep this going, creating undo group within undo group withing undo group ... that has to eventually become Inception? Right? Right.
页:
[1]