Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Addin Loading Multiple Times

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
rjay75
320 Views, 2 Replies

Addin Loading Multiple Times

I have an issue where an addin loads once the first time Inventor is opened. If the addin is unloaded and reloaded via the Addins dialog and no documents are open it loads once. If the addin is reloaded while a file is open is reloads twice.

 

I came to the conclusion it is loading multiple times because the it seems to go through the Activation method of the addin twice. When is the Activation method called during loading an addin?

2 REPLIES 2
Message 2 of 3
rjay75
in reply to: rjay75

I've figured it out. My addin has an automation component which exposes an api accessible from iLogic rules. During the initialization process it would rerun some rules automatically to initialize a window for a document. Since the rules depended on the addin the addin had to be referenced in the rule. It seems that if an unloaded addin is referenced through automation it would force load the addin. Since the addin hadn't completely loaded during the initialization phase it cause it to reload again.

 

Is there a method for the ApplicationAddinServer which can be called after an addin has fully loaded. Sort of like how a document has a Before and After during the loading phase?

Message 3 of 3
rjay75
in reply to: rjay75

In answer to my own question I see the Application.OnReady event is there just for this purpose. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report