<?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: Add File to Vault in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5637264#M9473</link>
    <description>&lt;P&gt;Note also that I think it might be necessary to set some of the FilestoreService's FileTransferHeaderValue properties before using UploadFilePart, and I'm assuming you haven't done this. &amp;nbsp;Thus, while the code I gave you may help get you to compile, it may not work properly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thankfully, there is already a blog entry related to this with some sample code:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://justonesandzeros.typepad.com/blog/2013/07/file-transfer-doing-it-the-hard-way.html&amp;nbsp;" target="_blank"&gt;http://justonesandzeros.typepad.com/blog/2013/07/file-transfer-doing-it-the-hard-way.html&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For ease of use, you could be using the SDK's method IFileManager.AddFile(...), but since you are porting old code (and you probably want to leave it as close to the same as it is as possible), you may just want to use the approach shown in the VB code from the blog post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;
&lt;P&gt;- Matt&lt;/P&gt;</description>
    <pubDate>Fri, 15 May 2015 18:01:29 GMT</pubDate>
    <dc:creator>smithmat</dc:creator>
    <dc:date>2015-05-15T18:01:29Z</dc:date>
    <item>
      <title>Add File to Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5633167#M9467</link>
      <description>&lt;P&gt;OK I surrender!&lt;/P&gt;&lt;P&gt;We have upgraded from Vault Pro 2013 to 2015 and now I cannot get our programs to add files into the vault.&lt;/P&gt;&lt;P&gt;We are using VB.net 2013 to add the files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried&amp;nbsp;changing the DocumentService.AddFile to DocumentService.AddUploadedFile but I get a Error 8000 An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in Autodesk.Connectivity.WebServices.dll.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the entire code for that...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Shared Function UploadFile(ByVal filePath As String, ByVal folderId As Long, ByVal serviceManager As WebServiceManager) As Long&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'This function adds a file to the vault and returns the MasterID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Using stream As New System.IO.FileStream(filePath, System.IO.FileMode.Open, System.IO.FileAccess.Read)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim fileData As ByteArray = New ByteArray()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileData.Bytes = New Byte(stream.Length - 1) {}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stream.Read(fileData.Bytes, 0, fileData.Bytes.Length)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oFile As Autodesk.Connectivity.WebServices.File&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oFile = serviceManager.DocumentService.AddUploadedFile(folderId, System.IO.Path.GetFileName(filePath), "Added by Vault ECN Creator", DateTime.Now, Nothing, Nothing, _&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileClassification.None, False, fileData)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UploadFile = oFile.MasterId&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch ex As Exception&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox(ex.Message)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UploadFile = -1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Using&lt;BR /&gt;End Function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I tried Wayne Brill's example of adding files using VDF. The problem here is that his example only allows for the folder to go 1 level deep. Our program has the user select a path in the vault so I have the folderID. Isn't there a way to set the folder directly using the folder ID or folder path without having to use a For Next to search the vault?&lt;/P&gt;&lt;P&gt;Web address to Wayne Brill's Example:&lt;/P&gt;&lt;P&gt;&lt;A href="http://adndevblog.typepad.com/manufacturing/2013/09/vault-2014-api-example-that-adds-a-file-and-associates-it-to-an-existing-file-in-the-vault.html" target="_blank"&gt;http://adndevblog.typepad.com/manufacturing/2013/09/vault-2014-api-example-that-adds-a-file-and-associates-it-to-an-existing-file-in-the-vault.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really do not care what process I use to add files, so either way is fine.&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2015 15:13:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5633167#M9467</guid>
      <dc:creator>meck</dc:creator>
      <dc:date>2015-05-13T15:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Add File to Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5633460#M9468</link>
      <description>&lt;P&gt;In 2015, the last parameter for DocumentService.AddUploadedFile is the&amp;nbsp;&lt;STRONG&gt;uploadTicket&lt;/STRONG&gt; (not the contents of the file). &amp;nbsp;The upload ticket is obtained by first calling&amp;nbsp;&lt;STRONG&gt;FilestoreService.UploadFilePart(fileContents)&lt;/STRONG&gt;. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps,&lt;/P&gt;
&lt;P&gt;- Matt&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2015 17:22:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5633460#M9468</guid>
      <dc:creator>smithmat</dc:creator>
      <dc:date>2015-05-13T17:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Add File to Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5636984#M9469</link>
      <description>&lt;P&gt;Thanks for the response Matt!&lt;/P&gt;&lt;P&gt;I have no idea how to get my file data into the correct format needed for the uploadticket argument. To be quite honest I don't even know what it is doing at this point in the code or why it needs that information.&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2015 15:33:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5636984#M9469</guid>
      <dc:creator>meck</dc:creator>
      <dc:date>2015-05-15T15:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Add File to Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5637030#M9470</link>
      <description>&lt;P&gt;You just replace this line:&lt;/P&gt;
&lt;P&gt;&lt;STRIKE&gt;oFile = serviceManager.DocumentService.AddUploadedFile(fol&lt;WBR /&gt;derId, System.IO.Path.GetFileName(filePath), "Added by Vault ECN Creator", DateTime.Now, Nothing, Nothing,&amp;nbsp;FileClassification.None, False, fileData)&lt;/STRIKE&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;with something similar to these two lines (not sure if my syntax is correct):&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Dim &lt;STRONG&gt;uploadTicket&lt;/STRONG&gt; As ByteArray = serviceManager.FilestoreService.UploadFilePart(&lt;STRONG&gt;fileData&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;oFile =&amp;nbsp;&lt;/SPAN&gt;serviceManager.DocumentService.AddUploadedFile(fol&lt;WBR /&gt;derId, System.IO.Path.GetFileName(filePath), "Added by Vault ECN Creator", DateTime.Now, Nothing, Nothing,&amp;nbsp;FileClassification.None, False, &lt;STRONG&gt;uploadTicket&lt;/STRONG&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps! &amp;nbsp;Let me know how it goes,&lt;/P&gt;
&lt;P&gt;- Matt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2015 15:55:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5637030#M9470</guid>
      <dc:creator>smithmat</dc:creator>
      <dc:date>2015-05-15T15:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Add File to Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5637197#M9471</link>
      <description>&lt;P&gt;Thanks again Matt!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This line &lt;SPAN&gt;Dim &lt;STRONG&gt;uploadTicket&lt;/STRONG&gt; As ByteArray = serviceManager.FilestoreService.UploadFilePart(&lt;STRONG&gt;fileData&lt;/STRONG&gt;&lt;/SPAN&gt;) is saying "Value of type 'Autodesk.Connectivity.WebServices.ByteArray' cannot be converted to 1-dimensional array of Byte.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have been trying to get around since you were kind enough to post the first time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you can help. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2015 17:26:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5637197#M9471</guid>
      <dc:creator>meck</dc:creator>
      <dc:date>2015-05-15T17:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Add File to Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5637216#M9472</link>
      <description>&lt;P&gt;Ah. &amp;nbsp;I got some of the syntax wrong (sorry, I don't have this code up in a compiler right now). &amp;nbsp;Try this modification:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Dim &lt;STRONG&gt;uploadTicket&lt;/STRONG&gt; As ByteArray = New ByteArray()&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;uploadTicket.Bytes = serviceManager.FilestoreService.UploadFilePart(&lt;STRONG&gt;fileData&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;oFile =&amp;nbsp;&lt;/SPAN&gt;serviceManager.DocumentService.AddUploadedFile(fol&lt;WBR /&gt;derId, System.IO.Path.GetFileName(filePath), "Added by Vault ECN Creator", DateTime.Now, Nothing, Nothing,&amp;nbsp;FileClassification.None, False, &lt;STRONG&gt;uploadTicket&lt;/STRONG&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Matt&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2015 17:36:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5637216#M9472</guid>
      <dc:creator>smithmat</dc:creator>
      <dc:date>2015-05-15T17:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Add File to Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5637264#M9473</link>
      <description>&lt;P&gt;Note also that I think it might be necessary to set some of the FilestoreService's FileTransferHeaderValue properties before using UploadFilePart, and I'm assuming you haven't done this. &amp;nbsp;Thus, while the code I gave you may help get you to compile, it may not work properly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thankfully, there is already a blog entry related to this with some sample code:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://justonesandzeros.typepad.com/blog/2013/07/file-transfer-doing-it-the-hard-way.html&amp;nbsp;" target="_blank"&gt;http://justonesandzeros.typepad.com/blog/2013/07/file-transfer-doing-it-the-hard-way.html&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For ease of use, you could be using the SDK's method IFileManager.AddFile(...), but since you are porting old code (and you probably want to leave it as close to the same as it is as possible), you may just want to use the approach shown in the VB code from the blog post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;
&lt;P&gt;- Matt&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2015 18:01:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5637264#M9473</guid>
      <dc:creator>smithmat</dc:creator>
      <dc:date>2015-05-15T18:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Add File to Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5637265#M9474</link>
      <description>&lt;P&gt;Matt,&lt;/P&gt;&lt;P&gt;It is the fileData variable that is causing the problem. It is dimensioned like:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;Dim&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt; fileData &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2" face="Consolas"&gt;As&lt;/FONT&gt; &lt;FONT color="#2b91af" size="2" face="Consolas"&gt;ByteArray&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt; = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2" face="Consolas"&gt;New&lt;/FONT&gt; &lt;FONT color="#2b91af" size="2" face="Consolas"&gt;ByteArray&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;()&lt;/FONT&gt;, and the UploadFilePart argument is asking for an array of Byte&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm just not sure how to get the fileData into that format. Change the &lt;FONT size="2" face="Consolas"&gt;fileData &lt;/FONT&gt;to &lt;FONT color="#0000ff" size="2" face="Consolas"&gt;Dim&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt; fileData() &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2" face="Consolas"&gt;As&lt;/FONT&gt; &lt;FONT color="#2b91af" size="2" face="Consolas"&gt;ByteArray&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt; = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2" face="Consolas"&gt;New&lt;/FONT&gt; &lt;FONT color="#2b91af" size="2" face="Consolas"&gt;Byte fails.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2015 18:02:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5637265#M9474</guid>
      <dc:creator>meck</dc:creator>
      <dc:date>2015-05-15T18:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Add File to Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5637311#M9475</link>
      <description>&lt;P&gt;Oh, sorry, I missed that part. &amp;nbsp;I think you just need to change the line to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;uploadTicket.Bytes = serviceManager.FilestoreService.UploadFilePart(&lt;/SPAN&gt;&lt;STRONG&gt;fileData.Bytes&lt;/STRONG&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2015 18:21:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5637311#M9475</guid>
      <dc:creator>smithmat</dc:creator>
      <dc:date>2015-05-15T18:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Add File to Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5640116#M9476</link>
      <description>&lt;P&gt;I never could get the "old" way to work. No matter how I changed the filecontents it would not take the values. I even used the Doug Redmond's&amp;nbsp;example you linked me to with no luck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I did get Wayne Brill's example to work, but I still need to be able to set the folder lower than just the top level. Seems very odd that I would have to loop through all folders in my vault to find the folder I'm looking for. I know the exact pathway, because I have the user select it, so i have the FolderID. Isn't there a way to set the folder directly either using the ID or the pathway?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the code that I have gotten to work, but of course it only works with the top level folders...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim results As VDF.Vault.Results.LogInResult = VDF.Vault.Library.ConnectionManager.LogIn(My.Settings.Server, My.Settings.DataBase, Vcred.UserName, My.Settings.Password, VDF.Vault.Currency.Connections.AuthenticationFlags.Standard, Nothing)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim connection As VDF.Vault.Currency.Connections.Connection = results.Connection&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim myFldrCol As System.Collections.Generic.List(Of VDF.Vault.Currency.Entities.Folder)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFldrCol = connection.FolderManager.GetChildFolders(connection.FolderManager.RootFolder, False, False)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Get the folder to add the new file to change the FullName test to a Folder in your vault&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim myFolder As VDF.Vault.Currency.Entities.Folder = Nothing&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim FolderPath As String = serviceManager.DocumentService.GetFolderById(folderId).FullName&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each Flder As VDF.Vault.Currency.Entities.Folder In myFldrCol&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Flder.FullName = FolderPath Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'If Flder.FullName = filePath Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFolder = Flder&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit For&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If myFolder Is Nothing Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox("Folder " &amp;amp; FolderPath &amp;amp; " not found in the vault", MsgBoxStyle.Critical, "File NOT Added!")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UploadFile = -1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Function&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim myFileIterationNewFile As VDF.Vault.Currency.Entities.FileIteration = Nothing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Using fileStream As Stream = New FileStream(filePath, FileMode.Open, FileAccess.Read)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Add the file to the vault&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFileIterationNewFile = connection.FileManager.AddFile(myFolder, Path.GetFileName(filePath), Path.GetFileName(filePath), DateTime.Now, Nothing, Nothing, FileClassification.None, False, fileStream)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Logout&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VDF.Vault.Library.ConnectionManager.LogOut(connection)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UploadFile = myFileIterationNewFile.EntityMasterId&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2015 15:48:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5640116#M9476</guid>
      <dc:creator>meck</dc:creator>
      <dc:date>2015-05-18T15:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: Add File to Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5640197#M9477</link>
      <description>&lt;P&gt;Mike,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, if you have the of the FolderID, you should be able to do it without getting all the folders and without looping through the folders.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;&lt;STRONG&gt;AddFile&lt;/STRONG&gt; method takes an&amp;nbsp;&lt;STRONG&gt;Autodesk.DataManagement.Client.Framework.Vault.Currency.Entities.Folder&amp;nbsp;&lt;/STRONG&gt;object that represents the intended parent folder. &amp;nbsp;You can create one of these with a&amp;nbsp;&lt;STRONG&gt;Connection&lt;/STRONG&gt; (which you have as&amp;nbsp;&lt;STRONG&gt;connection&lt;/STRONG&gt;) and an &lt;STRONG&gt;Autodesk.Connectivity.WebServices.Folder&amp;nbsp;&lt;/STRONG&gt;(which you could have by saving off what you get back from the call to serviceManager.DocumentService.GetFolderById(folderId);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;e.g.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dim folder As Autodesk.Connectivity.WebServices.Folder = serviceManager.DocumentService.GetFolderById(folderId)&lt;/P&gt;
&lt;P&gt;Dim myFolder&amp;nbsp;As VDF.Currency.Entities.Folder = New VDF.Currency.Entities.Folder(connection, folder)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps,&lt;/P&gt;
&lt;P&gt;- Matt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2015 16:36:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5640197#M9477</guid>
      <dc:creator>smithmat</dc:creator>
      <dc:date>2015-05-18T16:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Add File to Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5640249#M9478</link>
      <description>&lt;P&gt;That did it!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks Matt! I really appreciate all of your help and time!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What the working code looks like...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;Dim&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; results &lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;As&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; VDF.Vault.Results.&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;LogInResult&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; = VDF.Vault.&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;Library&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.ConnectionManager.LogIn(&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;My&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.Settings.Server, &lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;My&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.Settings.DataBase, Vcred.UserName, &lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;My&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.Settings.Password, VDF.Vault.Currency.Connections.&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;AuthenticationFlags&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.Standard, &lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;Nothing&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; connection &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; VDF.Vault.Currency.Connections.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;Connection&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; = results.Connection&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; lfolderID &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;Long&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; = VaultfolderId&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; folder &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; Autodesk.Connectivity.WebServices.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;Folder&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; = serviceManager.DocumentService.GetFolderById(lfolderID)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; myFolder &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; VDF.Vault.Currency.Entities.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;Folder&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; VDF.Vault.Currency.Entities.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;Folder&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(connection, folder)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; myFileIterationNewFile &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; VDF.Vault.Currency.Entities.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;FileIteration&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;Nothing&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;Using&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; fileStream &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;Stream&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;FileStream&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(filePath, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;FileMode&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.Open, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;FileAccess&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.Read)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2" color="#008000"&gt;&lt;FONT face="Consolas" size="2" color="#008000"&gt;&lt;FONT face="Consolas" size="2" color="#008000"&gt;' Add the file to the vault&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;myFileIterationNewFile = connection.FileManager.AddFile(myFolder, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;Path&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.GetFileName(filePath), &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;Path&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.GetFileName(filePath), &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;DateTime&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.Now, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;Nothing&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;Nothing&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;FileClassification&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.None, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;False&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;, fileStream)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;&lt;FONT face="Consolas" size="2" color="#0000ff"&gt;Using&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2" color="#008000"&gt;&lt;FONT face="Consolas" size="2" color="#008000"&gt;&lt;FONT face="Consolas" size="2" color="#008000"&gt;'Logout&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;VDF.Vault.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;&lt;FONT face="Consolas" size="2" color="#2b91af"&gt;Library&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.ConnectionManager.LogOut(connection)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;UploadFile = myFileIterationNewFile.EntityMasterId&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2015 17:17:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/5640249#M9478</guid>
      <dc:creator>meck</dc:creator>
      <dc:date>2015-05-18T17:17:52Z</dc:date>
    </item>
    <item>
      <title>RENAME Autodesk Vault file</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/6873125#M9479</link>
      <description>&lt;P&gt;Can someone suggest,how to RENAME an assembly file in Autodesk Vault using VAULT API &amp;nbsp;without breaking the relationship with its child and parent files?&lt;/P&gt;&lt;P&gt;Does Vault API has any RENAME filename FUNCTION or do we need to Checkout and provide new filename while CheckIn? It will be very helpful if you can provide some sample code.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 07:03:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/add-file-to-vault/m-p/6873125#M9479</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-13T07:03:01Z</dc:date>
    </item>
  </channel>
</rss>

