Search the Community
Showing results for tags 'undo'.
-
Having already asked with no replies some time ago, I thought I could give it a try once again. When I run my lisp routine which begins with (command "_.undo" "_BE") and ends with (command "_.undo" "_E") and for any reason I press "u" I get the annoying message (Lisp Expression) multiple times at the command prompt. Is there a way to hide this repeated message or get rid off it with any other way? Thank you.
-
Undoing LISP with Visual Basic doesn't REGEN changes
plackowski posted a topic in AutoLISP, Visual LISP & DCL
I think I'm encountering the same problem that was not resolved here. I'm trying to set all the layers of an xref to layer 251. I found two codes online, posted below. CVX: (defun c:cvx (/ ent_data);;changes all layers in selected xref to color 251 (setq ent_data (entget (car (entsel)))) (command "-layer" "Color" 251 (strcat (cdr (assoc 2 ent_data)) "*")"") ) X251: (defun C:X251 (/ EN L X ad layers) (command "UNDO" "BEGIN") (setq EN (nentsel "\nSelect Xref: ") L (cdr (assoc 8 (entget (car EN)))) X (substr L 1 (vl-string-position (ascii "|") L)) ) (setq AD (vla-get-ActiveDocument (vlax-get-Acad-Object)) layers (vla-get-Layers ad)) (if (/= (vl-string-search "|" L) nil) (progn (vlax-for layer layers (if (/= (vl-string-search (strcat X "|") (vla-get-name layer)) nil)(vla-put-Color layer 251)) ) (command ".REGEN") ) (princ "Not an Xref!") ) (prin1) (command "UNDO" "END") ) I used the CVX routine for a while, until I discovered that it doesn't work if I select xrefs that are attached to overlaid xrefs. So I tried switching to the X251 routine, but if I use UNDO, the changes aren't reflected until I REGEN the drawing. I tried using an undo group as suggested in the linked post, but that didn't change the result. Any advice?- 2 replies
-
- regen
- layer color
-
(and 2 more)
Tagged with:
-
Hi, to everyone! /I googled it, searched, did everything/ What I am trying to do is a lisp routine to undo last step (command) and use command I was using before "undo" command. For now it looks like: .line pt1 pt2 [enter] .undo [enter] [up arrow] [up arrow] [enter] (and here I can make line again) How to make ".undo [enter] [up arrow] [up arrow] [enter]" a simple lisp?
-
Hello all, I have been working on printing to text-searchable PDFs, and ran into a little problem. When I regen a drawing and print to PDF, the output is not consistent - it changes just a little bit from plot to plot. This is unacceptable to the client, who is very picky about their drawing packages. Can anyone reproduce this problem? I attached a script and a drawing that shows what I mean. I put both in C:\test\, then opened the drawing and loaded the script. The result is 10 pdfs saved in that folder, each one a little bit different. The right most line is sometimes outside the print area, sometimes inside. It seems completely random. The only code that runs between plots is (command "undo" "mark" "-purge" "all" "*" "no" "-overkill" "all" "" "done" "-purge" "all" "*" "no" "regen" "undo" "back") But how on earth could that change the drawing?! Furthermore, why does it change the drawing in a way that's inconsistent? If it was shifting things around, that's one thing, but to sometimes change things and sometimes leave them alone? I feel like my computer is non-deterministic example.dwg print.lsp
-
I am trying to execute Undo back with some predictability from a LISP routine. Is there any way to suppress (or force the "yes" prompt) even if Undo Back is executed more than once in a row?
-
Just now I moved an object. I panned and zoomed to see how it looked. I changed my mind and tried to undo the move. I had to undo dozens of phantom commands (listed as "group of commands") to get back to the move, when I should have had to undo only a couple of real commands. This is not an isolated incident. Looking at my Undo log, there may be no phantom commands for one real command, for another two, for another fifteen. There doesn't seem to be any correlation between the type of command and the number of phantoms. Is this something only Civil 3D does? Do I have a gremlin?
-
I want to know if I have understand this correctly or not: layer previous undos the last change in layer related command. Then If my last action is on layer, unod command will do the same. layer previous advantage is when you want to perform an undo which is not your last action.