Develop environment-focused Add-In

Develop environment-focused Add-In

Maxim-CADman77
Advisor Advisor
331 Views
3 Replies
Message 1 of 4

Develop environment-focused Add-In

Maxim-CADman77
Advisor
Advisor

I'd like to know how to turn my Add-In to "focused"* on given environment (ex. -Part 3D-model)?

 

*
I mean Add-In should auto-unload if no documents open or active document type differs from the given.
Inventor does have built-in "focused" Add-Ins, here are several examples:
Assembly Bonus Tools - Assemblies (3D)
Design Accelerator - Parts (3D)
Drag & Drop Interoperability - Parts (3D)
ESKD Support - Drawings

 

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Accepted solutions (1)
332 Views
3 Replies
Replies (3)
Message 2 of 4

tyler.warner
Advocate
Advocate

You can add buttons to the ribbon specifically for those environments (part, assembly, drawing, etc.) & tie commands to those buttons which are associated with the given environment. Would that work for what you're looking for?

If this solved your problem or answered your question, please click ACCEPT SOLUTION.
If this helped you, please click LIKE.
0 Likes
Message 3 of 4

Maxim-CADman77
Advisor
Advisor

The question is not about where to add buttons..

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 4 of 4

nmunro
Collaborator
Collaborator
Accepted solution

You can control add-ins in a couple of ways. In your .addin file for the add-in you can include a <LoadBehavior> flag that controls when the add-in first loads.

 

LoadBehavior - (Optional) Specifies when the add-in should be loaded in Inventor. This is important for better startup performance. This option can be specified using one of the following values:

0 - Load immediately on startup (not recommended)
1 - Load when any document is opened
1 - Load when a part document is opened (same as previous)
2 - Load when an assembly document is opened
3 - Load when a presentation document is opened
4 - Load when a drawing document is opened
10 - Load only on demand, either through the API or using the Add-In Manager.

 

Once loaded you can activate / deactivate individual add-ins using the ApplicationAddIns collection (property of the Application object) and checking to see if your ApplciationAddn object is included in the collection. Do a search on these properties in the Developer help for more information.

        


https://c3mcad.com

0 Likes