How to get the Vault Connection object in an Inventor 2025 addin

How to get the Vault Connection object in an Inventor 2025 addin

erling_thingelstad
Contributor Contributor
4,556 Views
16 Replies
Message 1 of 17

How to get the Vault Connection object in an Inventor 2025 addin

erling_thingelstad
Contributor
Contributor

An Inventor 2025 addin should now use .Net Core.

In Inventor 2024 and earlier addins I could reference Connectivity.Application.VaultBase.dll and get a Vault Connection object from Connectivity.Application.VaultBase.ConnectionManager.Instance.Connection.

 

This .dll is not in the Autodesk Vault 2025 SDK\bin\x64\core\ folder, and I assume the one in c:\Program Files\Autodesk\Vault Client 2025\Explorer\ is .Net Framework.

I tried referencing the dll in Vault Client 2025\Explorer, but it demanded:

You must add a reference to assembly 'Autodesk.DataManagement.Client.Framework.Vault, Version=30.0.0.0, Culture=neutral, PublicKeyToken=215b0879a7566597‘

The Core version of this .dll is already referenced in my project. I don't think this will get me anywhere.

 

How can I get the Vault Connection object in an Inventor 2025 addin?

0 Likes
Accepted solutions (1)
4,557 Views
16 Replies
Replies (16)
Message 2 of 17

Markus.Koechl
Autodesk
Autodesk
Accepted solution

The dll Connectivity.Application.VaultBase.dll has never been a library of the Vault SDK rather than a library of the Inventor Vault Addin installation. So, continue to reference from here: C:\ProgramData\Autodesk\ApplicationPlugins\VaultInventor2025.bundle\Contents\, and you will get the .NET Core version as required.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 3 of 17

damir.silajdzic
Participant
Participant

Hello, we are using this dll and facing this error when our addin (upgraded to .net core) is running and we try to login to Vault add-in inside of the Inventor 

damirsilajdzic_0-1727793595535.png

 

Message 4 of 17

Markus.Koechl
Autodesk
Autodesk

Can you please provide more details? Are you logged in to Vault when the error message for your addition is raised? Your Add-in will need to wait until the Vault Add-in is loaded and a connection is established.

 



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 5 of 17

damir.silajdzic
Participant
Participant

Yes, I get logged in and get ConnectionEstablished event, I get connection then when toolbar needs to be updated we get this error message. Do you need more details?

Message 6 of 17

damir.silajdzic
Participant
Participant

We discovered if we start Inventor without our addin, then when everything is loaded, we try to login to Vault addin, it works, after that we load our addin, in that case logout and login are working. So we have problem when our addin is loaded together with Vault addin at the same time, we are assuming that could be some dll version missmatch, but don't know which one. The error is related to JSON serialization so are you using some dll related to this error?

Message 7 of 17

Markus.Koechl
Autodesk
Autodesk

I suggest getting independent of the loading order. And why do you log in during load? Any function you add with your adding could check/reuse the existing Vault connection without logging in. See the tech preview of the iLogic-Vault; you can see how the 2024 and newer iLogic-Vault do it there. iLogic Addin does not log on its own.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 8 of 17

damir.silajdzic
Participant
Participant

Vault addin gets loaded first, then our addin, but when they are loaded together we get that error. Also we don't login on the load of the addin, we get this error when we press Login button on vault addin and connect to the server.

0 Likes
Message 9 of 17

Markus.Koechl
Autodesk
Autodesk

@damir.silajdzic : to exclude version conflicts, focus on VDF (..D..M..Client.Framework.*) or DevExpress (if used) libraries.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 10 of 17

damir.silajdzic
Participant
Participant

We use DevExpress version 24.1.5 and related to Client.Framework dll's we are using Autodesk.DataManagement.Client.Framework, Autodesk.DataManagement.Client.Framework.Forms, Autodesk.DataManagement.Client.Framework.Vault and Autodesk.DataManagement.Client.Framework.Vault.Forms. They are all 30.1.63.0 version. I tried to downgrade DevExpress to 22.2.12 version, but still same problem

0 Likes
Message 11 of 17

damir.silajdzic
Participant
Participant

Here is video what's happening when we try to login. You can see that Vault addin is loaded first then our addin is loaded. Login to Vault proceeds and then we get that kind of error.

damirsilajdzic_0-1727942221600.gif

 

0 Likes
Message 12 of 17

damir.silajdzic
Participant
Participant

And here is the working scenario when I disable automatic loading of our addin and load the addin after the Vault is logged in 

 

VaultLoginWorkingScenario.gif

0 Likes
Message 13 of 17

erling_thingelstad
Contributor
Contributor

Markus is trying to tell you that your addin should probably not log in at all. Instead you should get your Vault connection object from the Vault addin with the property VltBase.ConnectionManager.Instance.Connection he linked to. If this instance isn't available, the Vault client isn't logged in and your addin has to wait.

If you're not logging in, you cannot have problems logging in. 🙂

0 Likes
Message 14 of 17

damir.silajdzic
Participant
Participant

Since we don't have login to the Vault in our addin (mentioned in conversation, recorded in the video). this help us a lot, now we continue not using the login to the Vault and we don't have login problems. Thanks 🙂

0 Likes
Message 15 of 17

damir.silajdzic
Participant
Participant

@Markus.Koechl can you tell us which version of DevExpress you are using?

0 Likes
Message 16 of 17

Markus.Koechl
Autodesk
Autodesk
I use the exact matching 22.2.12. for Inventor and Vault extensions. For standalone Vault apps the latest.


Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 17 of 17

sn
Participant
Participant

I have exactly the same behavior when I load my migrated addin at startup time, but with another error message:

 

sn_0-1741721474617.png

 

I found another unanswered thread who describes the same error:

https://forums.autodesk.com/t5/inventor-programming-ilogic/can-not-log-in-to-vault-when-add-in-is-lo...

 

When I load my addin later everything in my addin works perfect. Login - Logout to Vault is no problem and the error message don't show up.

But late loading is no option, because i replace all file new commands and add a ribbon tab with own functionality in all environments, zero document included.

All tries to move the initialisation code to the "IVaultConnectionManagerService.ConnectionEstablished" event or the "ApplicationEvents.OnReady" event did not fix the problem. In the former versions of Inventor i never had the problem.

Any suggestions?

0 Likes