Hooks command-before-exec

I would like to make some hooks that basically check the condition of the document before it allows them to do something.

For instance, I have been trying to use:
command-before-exec[ID_OBJECTS_FAMSYM]
To determine the family name the user is trying to place and determine if the correct workset is currently active.

or

command-before-exec[ID_EDIT_CREATE_SIMILAR]
and clear out some of the parameters that need to be set and not copied when doing a create similar.

I cannot for the life of me figure out how to get any data on what is actually being done with these command ids. like what is the new element’s id or anything.

I don’t necessarily want to stop the user from doing the action, it would be nice if I could correct whatever for the user before the element is actually placed. or right after it is placed. either way could work I think.

1 Like

@patrickmRN ,

check out this topic: