<?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: Question for AAD: Checkin local files in Vault in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/question-for-aad-checkin-local-files-in-vault/m-p/6335187#M109731</link>
    <description>&lt;P&gt;Hi Remy,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currenlty adding or checking in Inventor files through the API is not supported by Autodesk. There is a large amount of meta-data that goes along with a file upload (RefId, dependencies, BOM). So, we recommend letting the CAD plug-in do the upload of CAD data. It’s the same reason Vault Explorer doesn’t let you drag and drop CAD files into Vault. &lt;BR /&gt;&lt;BR /&gt;There is a ticket logged for this with Vault engineering for enabling the Vault AddIn automation.&lt;BR /&gt;&lt;BR /&gt;You could also request this ability on the Vault Idea Station.&lt;BR /&gt;&lt;A href="http://forums.autodesk.com/t5/Vault-IdeaStation/idb-p/2" target="_blank"&gt;http://forums.autodesk.com/t5/Vault-IdeaStation/idb-p/2&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/vault-ideas/api-access-to-vault-inventor-add-in-and-other-cad-add-ins/idi-p/5703147" target="_blank"&gt;http://forums.autodesk.com/t5/vault-ideas/api-access-to-vault-inventor-add-in-and-other-cad-add-ins/idi-p/5703147&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Wayne&lt;/P&gt;</description>
    <pubDate>Wed, 18 May 2016 18:58:26 GMT</pubDate>
    <dc:creator>wayne.brill</dc:creator>
    <dc:date>2016-05-18T18:58:26Z</dc:date>
    <item>
      <title>Question for AAD: Checkin local files in Vault</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/question-for-aad-checkin-local-files-in-vault/m-p/6334864#M109730</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to checkin local files that are not in the Vault yet. I'm using the ocde below but get an error and don't know what to do?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am woriking in Inventor 2016/2017.&lt;/P&gt;&lt;P&gt;I found the code below online and there was no mentioning of problems.&lt;/P&gt;&lt;P&gt;I have a treelist with local files not in the vault yet. The user selects the file he wants to check in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;private void btnCheckIn_Click(object sender, EventArgs e)&lt;BR /&gt;{&lt;BR /&gt;IEnumerable&amp;lt;Autodesk.DataManagement.Client.Framework.Vault.Currency.Entities.Folder&amp;gt; thevaultfolders = _vaultConnection.FolderManager.GetChildFolders(_vaultConnection.FolderManager.RootFolder, true, false);&lt;BR /&gt;List&amp;lt;TreeListNode&amp;gt; chknodes = treeListUncheckFiles.GetAllCheckedNodes();&lt;BR /&gt;foreach (TreeListNode treeListNode in chknodes)&lt;BR /&gt;{&lt;BR /&gt;string flnam = treeListNode.GetDisplayText(0);&lt;BR /&gt;if (!System.IO.File.Exists(flnam)) continue;&lt;BR /&gt;string fldrnaam = Path.GetDirectoryName(flnam);&lt;BR /&gt;fldrnaam = GetDirnaam(fldrnaam);&lt;BR /&gt;Autodesk.DataManagement.Client.Framework.Vault.Currency.Entities.Folder fldr = thevaultfolders.FirstOrDefault(n =&amp;gt; n.FullName.Equals(fldrnaam));&lt;BR /&gt;if (fldr == null) continue;&amp;nbsp;&lt;BR /&gt;Autodesk.DataManagement.Client.Framework.Vault.Currency.Entities.FileIteration fileIteration;&lt;BR /&gt;using (Stream sr = new FileStream(flnam, FileMode.Open, FileAccess.Read))&lt;BR /&gt;{&lt;BR /&gt;fileIteration = _vaultConnection.FileManager.AddFile(fldr, fldrnaam, "Added by CreateForce",&lt;BR /&gt;DateTime.Now, null, null, FileClassification.DesignDocument, false, sr);&lt;/P&gt;&lt;P&gt;//// THIS IS THE LINE INVENTOR CRASHES. SOMETIMES WITHOUT A WARNING.&lt;/P&gt;&lt;P&gt;/// AND SOMETIMES WITH THE MESSAGE:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;File Cannot be Added. 'test.iam" cannot be added due to vault restrictions.&lt;/P&gt;&lt;P&gt;Restriction: You must add design files to the vault through the appropriate application to maintain correct relationship data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;_vaultConnection.FileManager.CheckinFile(fileIteration, "Added by CreateForce", false, null, null, false,&lt;BR /&gt;flnam, FileClassification.None, false, new FilePathAbsolute(fldrnaam));&lt;/P&gt;&lt;P&gt;treeListUncheckFiles.Nodes.Remove(treeListNode);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I get this to work ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 17:57:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/question-for-aad-checkin-local-files-in-vault/m-p/6334864#M109730</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-18T17:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Question for AAD: Checkin local files in Vault</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/question-for-aad-checkin-local-files-in-vault/m-p/6335187#M109731</link>
      <description>&lt;P&gt;Hi Remy,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currenlty adding or checking in Inventor files through the API is not supported by Autodesk. There is a large amount of meta-data that goes along with a file upload (RefId, dependencies, BOM). So, we recommend letting the CAD plug-in do the upload of CAD data. It’s the same reason Vault Explorer doesn’t let you drag and drop CAD files into Vault. &lt;BR /&gt;&lt;BR /&gt;There is a ticket logged for this with Vault engineering for enabling the Vault AddIn automation.&lt;BR /&gt;&lt;BR /&gt;You could also request this ability on the Vault Idea Station.&lt;BR /&gt;&lt;A href="http://forums.autodesk.com/t5/Vault-IdeaStation/idb-p/2" target="_blank"&gt;http://forums.autodesk.com/t5/Vault-IdeaStation/idb-p/2&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/vault-ideas/api-access-to-vault-inventor-add-in-and-other-cad-add-ins/idi-p/5703147" target="_blank"&gt;http://forums.autodesk.com/t5/vault-ideas/api-access-to-vault-inventor-add-in-and-other-cad-add-ins/idi-p/5703147&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Wayne&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 18:58:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/question-for-aad-checkin-local-files-in-vault/m-p/6335187#M109731</guid>
      <dc:creator>wayne.brill</dc:creator>
      <dc:date>2016-05-18T18:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Question for AAD: Checkin local files in Vault</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/question-for-aad-checkin-local-files-in-vault/m-p/6335686#M109732</link>
      <description>&lt;P&gt;Dear Wayne,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply, but what I don't understand is, when it is not supported to checkin files outside the vault, why do the functions&lt;/P&gt;&lt;P&gt;FileManager.AddFile and&amp;nbsp;FileManager.CheckinFile excist ?? They clearly imply to do something they apperently do not ??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 20:20:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/question-for-aad-checkin-local-files-in-vault/m-p/6335686#M109732</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-18T20:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Question for AAD: Checkin local files in Vault</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/question-for-aad-checkin-local-files-in-vault/m-p/6336088#M109733</link>
      <description>&lt;P&gt;Hi Remy,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Those functions can be used to add files to the Vault. Just not CAD files. (like Inventor or AutoCAD files)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this explains.&lt;/P&gt;
&lt;P&gt;Wayne&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 21:56:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/question-for-aad-checkin-local-files-in-vault/m-p/6336088#M109733</guid>
      <dc:creator>wayne.brill</dc:creator>
      <dc:date>2016-05-18T21:56:31Z</dc:date>
    </item>
  </channel>
</rss>

