Suppose we have one Part Factory "Block" and it contains two instances "Block-01" and "Block-02". By default instance "Block-01" is active. When we activate the other instance "Block-02", Is there any way I can register or subscribe to that event? I couldn't find any event exposed for this purpose. Please help.
Solved! Go to Solution.
Solved by MjDeck. Go to Solution.
Hi! Unless the two members are identical, otherwise, some parameters should change. Couldn't you subscribe to parameter change?
Many thanks!
Thanks for the reply. I will try using parameter change. But first of all, parameter change can be triggered in many cases, even in simple parts and assemblies. And also as you mentioned, there will be a use case in which two instances are identical, what can we do in that case? Isn't there any specific event for "Activate" of instance?
I'm no programmer but i'll try to give a suggestion anyway, not sure how to access it or if it would work:
Maybe you could use the member name value to check which is active, i found this reference in the programming help:
That's all i got, hope it helps (a little).
Niels van der Veer
Inventor professional user & 3DS Max enthusiast
Vault professional user/manager
The Netherlands
That we can use when we want to check which is active member. The requirement here is I need to catch a event when some other instance is activated.
@Anonymous , the following method can be used to respond to UI operation of activating a member in an iPart or iAssembly factory file. You're right: there doesn't seem to be a specific event for this.
You can listen to the UserInputEvents.OnTerminateCommand event. If the command name is "PartComputeiPartRowCtxCmd", that means a member activation operation has just finished.
Thanks for the reply. This was very helpful. Also, If i want to handle something before the activation of command, there is "OnActivateCommand" too. So, this will solve the purpose. 🙂
Can't find what you're looking for? Ask the community or share your knowledge.