The routine modifies the internal block entities using the entxxx functions and does a regen at the end to show the result.
Is there any way to get AutoCAD to regen when the user uses the UNDO command?
Check the program structure in the one which doesn't regen, compared to one which
does.
Something like this should regen when undo is called.
start undo
code
regen
end undo
Command: regen
Regenerating model.
Command: _.undo Enter the number of operations to undo or
[Auto/Control/BEgin/End/Mark/Back] <1>: 1 REGEN
Joe Burke
"GTVic" <nos...@address.withheld> wrote in message
news:12640166.110240614...@jiveforum2.autodesk.com...
--
Kent Cooper, AIA
"GTVic" wrote...
That's a command, the actual variable is REGENMODE.
This is one of those oddballs that has a command to change a variable which
is different from the variable name -- I think a carryover from when you
couldn't enter a variable name at the command prompt without going through
SETVAR.
E.g.:
(command "._undo" "_begin")
;; Modify objects here and redefine blocks
(command "._undo" "_end")
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
http://www.acadxtabs.com
"GTVic" <nos...@address.withheld> wrote in message news:19888022.110239957...@jiveforum2.autodesk.com...
See my reply to Tony's message above.
Tony, I modified my inital post to show info about the undo group. You must have posted before I updated it.
This works:
(command "undo" "begin")
;;; redefine blocks via INSERT command
(command "undo" "end")
This does not work
(command "undo" "begin")
;;; redefine blocks via ENTXXX functions
(command "regen")
(command "undo" "end")
The INSERT command has a built-in regen so the undo recognizes that and performs a regen on an undo.
The ENTXXX functions require a manual regen and the undo command skips manual regens.
Contrary to what you seem to expect, we ain't mind-readers. Something like this,
"redefine blocks via ENTXXX functions", is meaningless within the context of your
question.
I don't mean to be rude. But I do mean to say, a proper question will likey return a
proper answer. Similar to how the topic at hand behaves.
Joe Burke
You'll need to post the code, per Joe's comments, or at least a small sample
that exhibits the behavior you describe.
I haven't seen this. I routinely run functions which redefine blocks by way
of entmod or entmake, and they behave as expected with respect to undo. I
don't force a regen, instead I do an entupd on the affected inserts, and of
course the whole function is wrapped in an undo group. If I undo afterwards,
the blocks return to their previous appearance, apparently without a regen,
regardless of the regenmode setting.
Still haven't figured out what exactly causes it, but I'll venture to
guess that no amount of posted code is going to lead to a solution.
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
http://www.acadxtabs.com
"Tom Smith" <nospam> wrote in message news:41b865e0$1_1@newsprd01...
Interesting. I suppose I haven't created a situation in which the bug was
apparent.