I wonder if it is possible to get the securityheader from a Vault login in AutoCAD in the same way as in Inventor. In Inventor I add a reference to Connectivity.InventorAddin.EdmAddin.dll but I can' find a similiar reference for AutoCAD. I have an AutoCAD add-in (written in .NET) that needs to fecth information from Autodesk Vault.
Solved! Go to Solution.
I believe there is another back-door for getting this information inside AutoCAD. Like with the Inventor add-in, there is no official support for this technique.
If you use the following code from your add-in, you should be able to get the userId and ticket of the current Vault session.
if (VaultExplorerAppBase.Instance == null)
throw new ApplicationException("Unable to get Vault connection");
VaultConnectionManager connectionMgr = VaultExplorerAppBase.Instance.VaultManager;
if (connectionMgr.Connection.IsSignedIn() == false)
throw new ApplicationException("Vault connection doesn't exist.");
IWebServiceCredentials credentials = new UserIdTicketCredentials(connectionMgr.Connection.S
It has dependency on following dlls (which are located in AutoCAD installation directory). None of these DLLs are part of the supported Vault API.
I need to add a job to Job Processor from AutoCAD (Eg: Publish a drawing file). I have configured jobs and it was working fine with Inventor. Is it possible to do the same with AutoCAD.
I have gone through your post "http://forums.autodesk.com/t5/Autodesk-Vault-Custo
Can you provide some samples or reference documents to get vault instance from AutoCAD.
I would like to use the code from above but I get the folowing error message:
Error 1 'Connectivity.Common.Vault.VaultConnection
How can I solve this issue, or is there an other way to check/use the current connection from the user in AutoCAD?
For 2014 a different call needs to be made. I asked a colleague about this. Here is an excerpt of their reply:
To get the connection the add-in is using, they can access the Connectivity.Application.VaultBase.ConnectionManag
I tested this out and made a blog post about it. (with an VB.NET AutoCAD project for download)
Verry nice blog item.
I've edited the code to have a function that will return the connection or nothing instead.
Imports ADCFWV = Autodesk.DataManagement.Client.Framework.Vault Module mod_LogIn Public Function GetMyVaultConnection() As ADCFWV.Currency.Connections.Connection Dim MyConnection = Connectivity.Application.VaultBase.ConnectionManag
er.Instance.Connection If Not MyConnection Is Nothing And MyConnection.IsConnected Then Return MyConnection Else Return Nothing End If End Function End Module
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register