Get Vault Connection in Addin

Get Vault Connection in Addin

peteh
Enthusiast Enthusiast
1,498 Views
2 Replies
Message 1 of 3

Get Vault Connection in Addin

peteh
Enthusiast
Enthusiast

VB.NET

 

In  an addin code, is there a way to assign "m_conn" to the existing Vault login connection?  The user is already signed in and connected to Vault, so there should be a way to use that connection?

 

In external code (not in an addin)  I do this..

 

Public m_conn As VDF.Vault.Currency.Connections.Connection

 

Dim LoginResults As VDF.Vault.Results.LogInResult = VDF.Vault.Library.ConnectionManager.LogIn(sLocalHost, sVault, "Administrator", "", VDF.Vault.Currency.Connections.AuthenticationFlags.Standard, Nothing)

 

m_conn = LoginResults.Connection

 

 

 

 

0 Likes
Accepted solutions (1)
1,499 Views
2 Replies
Replies (2)
Message 2 of 3

junyi_zhu
Autodesk
Autodesk

If you are in Inventor, have a look at the post below.

 

https://forums.autodesk.com/t5/inventor-customization/use-inventor-vault-add-in-through-inventor-api...



Junyi Zhu

0 Likes
Message 3 of 3

peteh
Enthusiast
Enthusiast
Accepted solution

This link was the answer for me using IExplorerExtension.OnLogOn ...

https://forums.autodesk.com/t5/vault-customization/vault-add-in-how-to-get-name-of-vault/td-p/943774...

 

Public Sub OnLogOn(application As IApplication) Implements IExplorerExtension.OnLogOn

Dim oConn = application.Connection

 

End Sub

 

0 Likes