DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Precautions for non-redeemable macros

Started by samdavo, May 07, 2013, 02:32:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

samdavo

Suppose a macro sets everything selected to one layer, and one colour.  (I use such a macro all the time, you simply flag input the layer you want - no biggie there).

With my macro there is no way to reverse that - i.e. I'm calling it a non-redeemable macro.
I imagine there are heaps of such macros.

And I am assuming that you would have to go to a lot of trouble to make it/them reversible.

Easier might be to add a command at the front of the macro to save the file before executing it (?)
Just thinking aloud ok?  (sorry if the gear-meshes are a bit noisy - need oiling obviously).

JJG

Sam,

Yes there are some macro-commands with no way to be undone : for the best example, all the actions done with "Change" statements.
And of course most of the the macro who are doing many many actions in your dcd-file.
OK.
But there is some ways too to imagine and to realize your macros so that the action it (they) produces can be undone in only one clic of the "undo arrow" (i.e. "Ctrl z") ... It's another challenge to write such macros ...
for example :   http://forum.designcad.com/index.php?topic=26.15
or   http://forum.designcad.com/index.php?topic=3103.0
;)

samdavo

Many thanks there JJG
I agree,
PS I'm getting by without a lot of use of "same-as" (your link yes?) but = something else to learn later.
cheers sam