<?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: Simple vault upload example without associations in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/simple-vault-upload-example-without-associations/m-p/7530828#M7039</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Markus,&lt;BR /&gt;&lt;BR /&gt;Thank you very much for that useful piece of information.&amp;nbsp; Sorry I had to divert from this project to tackle something else lately, but this is what I needed to know.&amp;nbsp; Cheers!&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;--Jeff&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Nov 2017 14:47:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-11-09T14:47:02Z</dc:date>
    <item>
      <title>Simple vault upload example without associations</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/simple-vault-upload-example-without-associations/m-p/7475633#M7034</link>
      <description>&lt;P&gt;Hi folks,&lt;BR /&gt;&lt;BR /&gt;Can someone please point me to a very basic vault upload example using generic files which are not related to Inventor or AutoCAD or any specific product?&amp;nbsp; I want to stay away from dealing with associations and keep it very simple for this.&amp;nbsp; I just need to create a folder in Vault (if it doesn't yet exist) and upload some files with versioning so I can check-in more recent versions later.&amp;nbsp; An&amp;nbsp;example using VB.NET would be most helpful.&amp;nbsp; Many thanks!&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;-- Jeff&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 19:48:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/simple-vault-upload-example-without-associations/m-p/7475633#M7034</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-19T19:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Simple vault upload example without associations</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/simple-vault-upload-example-without-associations/m-p/7490529#M7035</link>
      <description>&lt;P&gt;Jeff, I personally don't have any sample code for you, but if you look in the chm file in the docs folder of the Vault SDK, the knowledge base section has an article called "How to aquire files". At the end of the article is some code for using the webservicemanager with adding and checking in files. It's for an older version of Vault, but I expect it still applies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also find these articles on "It's just ones and zeros" blog.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 14:47:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/simple-vault-upload-example-without-associations/m-p/7490529#M7035</guid>
      <dc:creator>mike_ponti</dc:creator>
      <dc:date>2017-10-25T14:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Simple vault upload example without associations</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/simple-vault-upload-example-without-associations/m-p/7490567#M7036</link>
      <description>&lt;P&gt;Hi Mike,&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply.&amp;nbsp; Yeah, I've been through a bunch of that stuff, but so much of it is tailored for the more typical usage with Inventor or AutoCAD files that have associations with related files and what-not.&amp;nbsp; And&amp;nbsp;Doug's blog has tons of info, but I'm really just looking for one simple piece without all the distractions.&lt;BR /&gt;&lt;BR /&gt;I've managed to get a file into the vault mainly using just the FileManager.AddFile() function, but for some reason, I can only put it at the very root of the vault presently - if I try to put it into any existing folder (or folder in a folder, etc.) in the vault, it does not work.&amp;nbsp; Hopefully, I'll get that resolved soon and will be out of the weeds.&amp;nbsp; Thanks again.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;--Jeff&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 14:55:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/simple-vault-upload-example-without-associations/m-p/7490567#M7036</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-25T14:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Simple vault upload example without associations</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/simple-vault-upload-example-without-associations/m-p/7490725#M7037</link>
      <description>&lt;P&gt;vault and simple usually don't go well together &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you really want to see what the vault client does when you upload a file to a folder, use a tool like Fiddler to spy on the http calls the vault client makes to perform the operation. The vault client is really nice that way in the sense that nothing is hidden. You will be able to see&amp;nbsp;each of the api calls and the &amp;nbsp;parameters it sends during the operation. It's labor intensive, but a good code editor that will format the xml for you helps make things readable.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 15:40:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/simple-vault-upload-example-without-associations/m-p/7490725#M7037</guid>
      <dc:creator>mike_ponti</dc:creator>
      <dc:date>2017-10-25T15:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Simple vault upload example without associations</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/simple-vault-upload-example-without-associations/m-p/7496138#M7038</link>
      <description>&lt;P&gt;Hi Jeff,&lt;/P&gt;
&lt;P&gt;As you can add a file to the root, but not to a given folder, I got the idea that you miss converting the WebService.Folder object to the IEntity folder. Let me put this into this way: vaultfolder&amp;nbsp;= conn......GetFolderByPath("$/Documents/") wrapped into the IEntity Folder object will work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Compare the code below that I am using to add single PDF or Xlsx files to Vault:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;// upload file to Vault
                Folder vaultFolder = conn.WebServiceManager.DocumentService.FindFoldersByPaths(settings.ReportsVaultPath.ToSingleArray()).First();
                if (vaultFolder == null || vaultFolder.Id == -1)
                    throw new Exception("Vault reports folder " + settings.ReportsVaultPath + " not found");

                var folderEntity = new Autodesk.DataManagement.Client.Framework.Vault.Currency.Entities.Folder(conn, vaultFolder);
                try
                {
                    addedFile = conn.FileManager.AddFile(folderEntity, "Created by Job Processor", null, null, FileClassification.None, false, vdfPath);
                }
                catch
                {
                    throw new Exception("Job could not add report file " + vdfPath);
                }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 08:32:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/simple-vault-upload-example-without-associations/m-p/7496138#M7038</guid>
      <dc:creator>Markus.Koechl</dc:creator>
      <dc:date>2017-10-27T08:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Simple vault upload example without associations</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/simple-vault-upload-example-without-associations/m-p/7530828#M7039</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Markus,&lt;BR /&gt;&lt;BR /&gt;Thank you very much for that useful piece of information.&amp;nbsp; Sorry I had to divert from this project to tackle something else lately, but this is what I needed to know.&amp;nbsp; Cheers!&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;--Jeff&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 14:47:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/simple-vault-upload-example-without-associations/m-p/7530828#M7039</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-09T14:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Simple vault upload example without associations</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/simple-vault-upload-example-without-associations/m-p/9452378#M7040</link>
      <description>&lt;P&gt;Hi Markus, thanks for this tip. I'm trying to do this in powerShell, but with this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$vaultFolder = $vault.DocumentService.FindFoldersByPaths("$/Resources")&lt;BR /&gt;$fileFromDisk = New-Object Autodesk.DataManagement.Client.Framework.Currency.FilePathAbsolute "C:\Temp\ExportedNumber.csv"&lt;BR /&gt;$fileClassification = New-Object Autodesk.Connectivity.WebServices.FileClassification&lt;BR /&gt;$fileAssoc = New-Object Autodesk.Connectivity.WebServices.FileAssoc $null&lt;BR /&gt;$addedFile = $vaultConnection.FileManager.AddFile($vaultFolder,"Added by powerShell", $fileAssoc, $null, $fileClassification, $false, $fileFromDisk)&lt;BR /&gt;Show-Inspector&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it's giving me an error:&amp;nbsp;Cannot find an overload for "AddFile" and the argument count: "7".&lt;BR /&gt;At D:\CAL Data\CG Projects\powerShell\UploadingAFile.ps1:26 char:1&lt;BR /&gt;+ $addedFile = $vaultConnection.FileManager.AddFile($vaultFolder,"Added ...&lt;BR /&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;+ CategoryInfo : NotSpecified: (:) [], MethodException&lt;BR /&gt;+ FullyQualifiedErrorId : MethodCountCouldNotFindBest&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to understand your comment that the $vaultFolder object needs to be wrapped in an iEntity folder object, but I'm getting stuck on how to do that. Any tips would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also posted this question &lt;A href="https://forums.autodesk.com/t5/vault-customization/add-files-to-vault-from-local-hard-disc-using-the-addfile-method/m-p/9452317/highlight/true#M8464" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2020 08:04:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/simple-vault-upload-example-without-associations/m-p/9452378#M7040</guid>
      <dc:creator>clastrilla</dc:creator>
      <dc:date>2020-04-18T08:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Simple vault upload example without associations</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/simple-vault-upload-example-without-associations/m-p/9458226#M7041</link>
      <description>&lt;P&gt;Found it - please see this &lt;A href="https://forums.autodesk.com/t5/vault-customization/add-files-to-vault-from-local-hard-disc-using-the-addfile-method/m-p/9458223/highlight/true#M8476" target="_blank" rel="noopener"&gt;link&lt;/A&gt;:&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 08:05:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/simple-vault-upload-example-without-associations/m-p/9458226#M7041</guid>
      <dc:creator>clastrilla</dc:creator>
      <dc:date>2020-04-21T08:05:38Z</dc:date>
    </item>
  </channel>
</rss>

