Change add-in load order

Change add-in load order

TA.Fehr
Advocate Advocate
768 Views
7 Replies
Message 1 of 8

Change add-in load order

TA.Fehr
Advocate
Advocate

I have an add-in that utilizes references to Vault. However, I've found that in 2025 if my add-in loads first, the vault add-in fails to load. I've changed the ClassID of my add-in to load later with no effect, and tried using the suggestions found here, here, and here.

The issues is that the only way I can place a wait on my add-in is at the ApplicationAddInServer.Activate stage. Which means that my add-in is already activated preventing Vault from activating. I tried programmatically deactivating mine and activating vault, but this causes an unknown error when I activate the vault add-in. The only way it seems is to start Inventor with my add-in set to not load automatically and then manually load it once Inventor starts, which I naturally wish to avoid.

0 Likes
Accepted solutions (1)
769 Views
7 Replies
Replies (7)
Message 2 of 8

Frederick_Law
Mentor
Mentor

Vault addin is loaded when start up.  In IV2023.

If your addin load on files open (part), it should work.

Unless you need it to load on start also.

 

Don't if your addin can loop and wait and check of Vault addin is loaded.

0 Likes
Message 3 of 8

TA.Fehr
Advocate
Advocate

Thanks for the quick reply.

This reference states that the add-ins for Inventor Pro only load at startup and not in session. So I can unload it later, but since it has already been loaded when Vault add-in wishes to load, vault never loads in order to activate it later.

This matches what I've been seeing, where I can have the buttons load in assemblies/parts/drawings etc, but the add-in itself loads only at startup.

0 Likes
Message 4 of 8

Frederick_Law
Mentor
Mentor
Accepted solution

My addins are not loaded in Startup (since at least IV2012), Vault is:

AddinLoading-01.jpg

 

LoadBehavior is set in the .addin file.

https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-52422162-1784-4E8F-B495-CDB7BE9987AB

0 Likes
Message 5 of 8

TA.Fehr
Advocate
Advocate

Right, I had long since set that and forgot about it. I have mine set to

<LoadBehavior>1</LoadBehavior> 

I'll fiddle around with this and see if I can get different results.

Thanks for the pointer. 

0 Likes
Message 6 of 8

Frederick_Law
Mentor
Mentor

I tried this in iLogic:

 

 

Dim oAppAddin As ApplicationAddIn
Dim oAppAddins As ApplicationAddIns

oAppAddins = ThisApplication.ApplicationAddIns
For Each oAppAddin In oAppAddins
	Logger.Info(oAppAddin.DisplayName)
	Logger.Info(oAppAddin.Activated.ToString)
Next

 

 

https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-FAA0D34E-FAEB-456D-A3C3-0F8225753D85

 

Should be able to do in addin and check if Vault is loaded/active.

Question is: are addin loads in parallel?

If not, waiting for Vault to be active will not work.

0 Likes
Message 7 of 8

TA.Fehr
Advocate
Advocate

@Frederick_Law , you were correct to reference the load behavior setting.
My .addin file was still built on an older template so it referenced <LoadOnStartup> and not <LoadBehavior>

Replacing <LoadOnStartup>1</LoadOnStartup> in the .addin file with <LoadBehavior>1</LoadBehavior> resolved the issue.

Thanks

Message 8 of 8

g.georgiades
Advocate
Advocate

The way you describe the addins not loading - sounds like it could be a dependency issue. Your addin and the vault addin may be trying to load different versions of a dependency and that is causing one of them to not load afterwards.

0 Likes