Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Subscribe to ActivateMember event

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
Anonymous
342 Views, 7 Replies

Subscribe to ActivateMember event

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.

7 REPLIES 7
Message 2 of 8
johnsonshiue
in reply to: Anonymous

Hi! Unless the two members are identical, otherwise, some parameters should change. Couldn't you subscribe to parameter change?

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 3 of 8
Anonymous
in reply to: johnsonshiue

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?

Message 4 of 8
-niels-
in reply to: Anonymous

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:

afbeelding.png

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

Message 5 of 8
Anonymous
in reply to: -niels-

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.

Message 6 of 8
Anonymous
in reply to: johnsonshiue

Call is not coming to parameter change also. What should I do?

Message 7 of 8
MjDeck
in reply to: Anonymous

@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.


Mike Deck
Software Developer
Autodesk, Inc.

Message 8 of 8
Anonymous
in reply to: MjDeck

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.

Post to forums  

Technology Administrators


Autodesk Design & Make Report