<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get Securityheader from Vault Login in AutoCAD in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/4419949#M11373</link>
    <description>&lt;P&gt;Hi Wayne,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Verry nice blog item.&lt;/P&gt;&lt;P&gt;I've edited the code to have a function that&amp;nbsp;will return the connection or nothing instead.&lt;/P&gt;&lt;PRE&gt;Imports ADCFWV = Autodesk.DataManagement.Client.Framework.Vault
Module mod_LogIn
    Public Function GetMyVaultConnection() As ADCFWV.Currency.Connections.Connection
        Dim MyConnection = Connectivity.Application.VaultBase.ConnectionManager.Instance.Connection
        If Not MyConnection Is Nothing And MyConnection.IsConnected Then
            Return MyConnection
        Else
            Return Nothing
        End If
    End Function
End Module&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
    <pubDate>Thu, 12 Sep 2013 05:10:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-09-12T05:10:48Z</dc:date>
    <item>
      <title>Get Securityheader from Vault Login in AutoCAD</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/3773017#M11368</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: SV; mso-bidi-language: AR-SA;"&gt;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.&amp;nbsp; I have an AutoCAD add-in (written in .NET)&amp;nbsp;that needs to&amp;nbsp;fecth information from Autodesk Vault.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2013 08:09:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/3773017#M11368</guid>
      <dc:creator>ellmag</dc:creator>
      <dc:date>2013-02-08T08:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Get Securityheader from Vault Login in AutoCAD</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/3777791#M11369</link>
      <description>&lt;P&gt;I believe there is another back-door for getting this information inside AutoCAD.&amp;nbsp; Like with the Inventor add-in, there is no official support for this technique.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;if (VaultExplorerAppBase.Instance == null)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;{&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new ApplicationException("Unable to get Vault connection");&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;VaultConnectionManager connectionMgr = VaultExplorerAppBase.Instance.VaultManager;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;if (connectionMgr.Connection.IsSignedIn() == false)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;{&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;throw new ApplicationException("Vault connection doesn't exist.");&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;IWebServiceCredentials credentials = new UserIdTicketCredentials(connectionMgr.Connection.SecurityContext.RemoteHost,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;&amp;nbsp; connectionMgr.Connection.SecurityContext.KnowledgeVault,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;&amp;nbsp;connectionMgr.Connection.SecurityContext.UserID,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;&amp;nbsp;connectionMgr.Connection.SecurityContext.Ticket);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It has dependency on following dlls (which are located in AutoCAD installation directory).&amp;nbsp; None of these DLLs are part of the supported Vault API.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;Connectivity.Application.VaultBase.dll&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;Connectivity.Common.dll&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;Connectivity.Common.Vault.dll&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;Connectivity.Explorer.Framework.dll&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800000"&gt;Connectivity.Proxies.utils.dll&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2013 22:23:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/3777791#M11369</guid>
      <dc:creator>Redmond.D</dc:creator>
      <dc:date>2013-02-11T22:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Get Securityheader from Vault Login in AutoCAD</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/4321746#M11370</link>
      <description>&lt;P&gt;Hi Doug,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I have gone through your post "&lt;A target="_blank" href="http://forums.autodesk.com/t5/Autodesk-Vault-Customization/Get-Securityheader-from-Vault-Login-in-AutoCAD/td-p/3773017&amp;quot;."&gt;http://forums.autodesk.com/t5/Autodesk-Vault-Customization/Get-Securityheader-from-Vault-Login-in-AutoCAD/td-p/3773017".&lt;/A&gt; Got no idea in acheiving my functionality.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Can you provide some samples or reference documents to get vault instance from AutoCAD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;FONT face="georgia,palatino"&gt;Balaji A&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2013 00:29:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/4321746#M11370</guid>
      <dc:creator>Balaji_07</dc:creator>
      <dc:date>2013-07-08T00:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Get Securityheader from Vault Login in AutoCAD</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/4416961#M11371</link>
      <description>&lt;P&gt;I would like to use the code from above but I get the folowing error message:&lt;/P&gt;&lt;P&gt;Error&amp;nbsp;1&amp;nbsp;'Connectivity.Common.Vault.VaultConnectionManager' does not contain a definition for 'connection' and no extension method 'connection' accepting a first argument of type ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I solve this issue, or is there an other way to check/use the current connection from the user in AutoCAD?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2013 09:40:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/4416961#M11371</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-11T09:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Get Securityheader from Vault Login in AutoCAD</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/4419681#M11372</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;For 2014 a different call needs to be made.&amp;nbsp;I asked a colleague about this. Here is an excerpt of their reply:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;To get the connection the add-in is using, they can access the Connectivity.Application.VaultBase.ConnectionManager.Instance.Connection property. This will return the active connection that the Vault add-in is using at that time. If the add-in does not have a valid connection when this property is read, then I believe it will return null.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;lt;&amp;lt; &amp;lt;&amp;lt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;I tested this out and made a blog post about it. (with an VB.NET AutoCAD project for download)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;A href="http://adndevblog.typepad.com/manufacturing/2013/09/autocad-2014-vault-add-in-connection.html" target="_blank"&gt;http://adndevblog.typepad.com/manufacturing/2013/09/autocad-2014-vault-add-in-connection.html&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Thanks,&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2013 22:04:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/4419681#M11372</guid>
      <dc:creator>wayne.brill</dc:creator>
      <dc:date>2013-09-11T22:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Get Securityheader from Vault Login in AutoCAD</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/4419949#M11373</link>
      <description>&lt;P&gt;Hi Wayne,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Verry nice blog item.&lt;/P&gt;&lt;P&gt;I've edited the code to have a function that&amp;nbsp;will return the connection or nothing instead.&lt;/P&gt;&lt;PRE&gt;Imports ADCFWV = Autodesk.DataManagement.Client.Framework.Vault
Module mod_LogIn
    Public Function GetMyVaultConnection() As ADCFWV.Currency.Connections.Connection
        Dim MyConnection = Connectivity.Application.VaultBase.ConnectionManager.Instance.Connection
        If Not MyConnection Is Nothing And MyConnection.IsConnected Then
            Return MyConnection
        Else
            Return Nothing
        End If
    End Function
End Module&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2013 05:10:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/4419949#M11373</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-12T05:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get Securityheader from Vault Login in AutoCAD</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/6023567#M11374</link>
      <description>&lt;P&gt;I'm trying to do this with Vault 2016, but there seems to have been some changes in the API...&lt;/P&gt;
&lt;P&gt;Anyone knows how to update this code?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 09:14:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/6023567#M11374</guid>
      <dc:creator>rhesusminus</dc:creator>
      <dc:date>2016-02-04T09:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get Securityheader from Vault Login in AutoCAD</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/6023594#M11375</link>
      <description>&lt;P&gt;Hello Trond,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can retrieve Vault connection in ACAD 2016 using the following code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add reference to "Connectivity.Application.VaultBase" from AutoCAD installation folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Autodesk.DataManagement.Client.Framework.Vault.Currency.Connections.Connection con = Connectivity.Application.VaultBase.ConnectionManager.Instance.Connection;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(code is same as Peter has posted, post more info on the error you receive)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;Balaji A&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;FONT size="1 2 3 4 5 6 7" face="lucida sans unicode,lucida sans"&gt;Accept this post as Solution if&amp;nbsp; you found it usefull and do not forget to hit Kudos!&amp;nbsp;&lt;/FONT&gt;&lt;/EM&gt;&lt;IMG src="https://forums.autodesk.com/i/smilies/16x16_smiley-wink.gif" alt="Smiley Wink" title="Smiley Wink" border="0" /&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 09:30:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/6023594#M11375</guid>
      <dc:creator>Balaji_07</dc:creator>
      <dc:date>2016-02-04T09:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Get Securityheader from Vault Login in AutoCAD</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/6023598#M11376</link>
      <description>&lt;P&gt;Thank you. Works like a charm &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;Searched the Vault SDK help file, but didn't help much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 09:32:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/get-securityheader-from-vault-login-in-autocad/m-p/6023598#M11376</guid>
      <dc:creator>rhesusminus</dc:creator>
      <dc:date>2016-02-04T09:32:13Z</dc:date>
    </item>
  </channel>
</rss>

