I created a macro that launches and validates the SmartProperty on each mechanically welded item (which therefore loops around for the time it takes to make all the items).
I would like this macro to run when the SmartProperties is validated on the part.
The macro works very well when I launch it alone.
But he tells me because the Smart is a priori already launched...
"-> "After closing SmartProperties" - indicates that the action will be triggered as soon as one exits the SmartProperties utility. Indeed, you can validate the information by pressing (green validate button), but if the window has been pinned then this action will only be taken into account by pressing the red cross."
Using "after closing" launches the macro once the PropertyManager is closed.
But when launching a macro with the SoldiWorks APIs, the code waits for the macro to complete to hand over, so SmartProperties stays open until your macro ends.
The only solution would be to go through an executable and no longer through a macro. In this case, the program is launched asynchronously and SmartProperties closes after launching the application.