@james1010

You can put those purge and brush macros into your TPost_.g and run them as sub-programs using the M98 command.

TPost_.g occurs AFTER the tool is picked up.