Macro Advice: how to prevent the command deselecting elements?

Hey I wanted to have a pipeline created for a macro, just need this tiny bit of information to have the macro work in a consecutive order. Thank you!


Macros are great for stringing together sequences of commands, but they have a few rather severe limitations:

  1. they cannot store data for future use
  2. they cannot make conditional decisions
  3. they cannot iterate (loop)

For this reason, once you reach a certain level of sophistication in your needs for a command, macros become unwieldy or just not possible, you need to go to the next level, which are simple scripts.

Concerning selection of objects you can have a certain amount of control using SelLast or SelPrev or SelNone. However this is very limited… There are a few workarounds to get a bit further - you can for example simulate storage of your selection by assigning either object names or group names to your selection and recalling them later in the macro. The tools for doing this in macros are the usual suspects -

-SetObjectName "Name" / -SelName "Name"
-Group "Groupname" / -SelGroup "Groupname"

To remove object names afterward, if the objects are selected you can use
-SetObjectName ""

However, you will find that the limitations 2 and 3 above will start to build a lot of walls you cannot get over without diving into some scripting…


1 Like

Thanks Mitch for clarifying. I will work myself into this. Hannes