<?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: Data Standard - Updating Properties on Multiple Files in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-updating-properties-on-multiple-files/m-p/6532183#M9823</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;I find $vaultExplorerUtil.UpdateFileProperties() to be painfully slow if you update dozends or even hundreds of files. [...]&amp;nbsp;while native Vault Explorer property editing via UI is much faster.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That was my bad, I fear. Further testing showed API call and UI usage to be more or less equal in speed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;How do you manage progress reporting?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to background the logic doing the property editing via &lt;STRONG&gt;Start-Job&lt;/STRONG&gt; because I hoped Vault Explorer would remain usable throughout the Operation this way,&amp;nbsp;but then the script seems to do nothing at all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I use Powershell runspaces now and it works fine!&lt;/P&gt;</description>
    <pubDate>Tue, 30 Aug 2016 19:38:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-08-30T19:38:55Z</dc:date>
    <item>
      <title>Data Standard - Updating Properties on Multiple Files</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-updating-properties-on-multiple-files/m-p/5461526#M9819</link>
      <description>&lt;P&gt;I am working on some custom routines for a client and trying to use the data standard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;They are currently on a different document management system and preparing to switch and want the same functionality they previously had.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Part of this is being able to update specific properties on selection of documents at the same time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used the Data standard created Custom Command / Custom PS1 / Custom XAML I have been able to work through everything except actually applying the updates to the additional files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code I am currently using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$vaultContext.ForceRefresh = $true&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$dialog = $dsCommands.GetEditDialog($fileId)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$xamlFile = New-Object CreateObject.WPF.XamlFile "UpdateProjectInfoxaml", "UpdateProjectInfo.xaml"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$dialog.XamlFile = $xamlFile&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$result = $dialog.Execute()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if ($result)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; $ids = @()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; $propDefIds = @()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; $propVals = @()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; foreach ($prop in $dialog.ViewModel.Properties)&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;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch($prop.Name)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { ($_ -eq "ProjectStatus") } #&amp;nbsp;syntax for adding multiple conditions -or ($_ -eq "ProjectSupervisor") }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $propDefIds += $prop.Id;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $propVals += $prop.Value;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; # just realized add check to not include current file Id in list of Id's&lt;/P&gt;&lt;P&gt;&amp;nbsp; foreach ($file in $vaultContext.CurrentSelectionSet)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ids += $file.Id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; $dsDiag.Inspect()&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;&lt;P&gt;&amp;nbsp; # Update Files&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; # $vault.documentservice.UpdateFileProperties($Ids, $propDefIds, $propVals, "Property Update");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The last actual line is where I am having difficulties calling the UpdateFileProperties&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will probably&amp;nbsp;need to do the following&amp;nbsp;CheckOutFiles / UpdateFilesProperties / CheckInFiles or is there a better method for this through your data standard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any sample would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 17:20:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-updating-properties-on-multiple-files/m-p/5461526#M9819</guid>
      <dc:creator>BruceMcKee</dc:creator>
      <dc:date>2015-01-07T17:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: Data Standard - Updating Properties on Multiple Files</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-updating-properties-on-multiple-files/m-p/5462195#M9820</link>
      <description>&lt;P&gt;Hi BruceMcKee,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as far as I know, datastandard does not offer you a better solution. It exposes you some important objects in the runspace, which you can work with.&lt;/P&gt;&lt;P&gt;Which vault version do you use? 2015? 2015 R2?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Via the documentservice you have to do a checkin / checkout, thats right. But if you would use the explorerutil, then you don't have to do that.&lt;/P&gt;&lt;P&gt;Maybe this article helps you:&amp;nbsp;&lt;A target="_blank" href="http://blog.coolorange.com/2013/01/25/updatefileproperties-from-vault-api-in-powershell/&amp;nbsp;"&gt;http://blog.coolorange.com/2013/01/25/updatefileproperties-from-vault-api-in-powershell/&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2015 06:16:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-updating-properties-on-multiple-files/m-p/5462195#M9820</guid>
      <dc:creator>Patrick.Gruber</dc:creator>
      <dc:date>2015-01-08T06:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Data Standard - Updating Properties on Multiple Files</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-updating-properties-on-multiple-files/m-p/5462228#M9821</link>
      <description>Hi, as Patrick mentioned, if you like to update multiple files via Data Standard, then you have to do it via the API, as for now. Obiously the one file you edit via Data Standard will be updated by Data Standard, however, the other files you like to update has to be treated separately, as you already recognized.&lt;BR /&gt;&lt;BR /&gt;just instead of using the $vault.documentservice.UpdateFileProperties($Ids, $propDefIds, $propVals, "Property Update"); i would rather then use $vaultExplorerUtil.UpdateFileProperties($file, $dict)&lt;BR /&gt;&lt;BR /&gt;the difference is that the UpdateFileProperties from the $vault ()regular server API) only work with properties that are not mapped and you have to do the check-out/-in. The UpdateFileProperties from the $vaultExplorerUtil (client side API) does all the things for you. So it checks the file out and in and manages the mapped properties.&lt;BR /&gt;As a down side, you can perform it just file by file.&lt;BR /&gt;&lt;BR /&gt;here a sample:&lt;BR /&gt;&lt;BR /&gt;$dict = New-Object "System.Collections.Generic.Dictionary[[Autodesk.Connectivity.WebServices.PropDef],[Object]]"&lt;BR /&gt;$dict.Add($propDef, "yourValue")&lt;BR /&gt;$vaultExplorerUtil.UpdateFileProperties($file, $dict)&lt;BR /&gt;&lt;BR /&gt;The $file id obviously the file you like to update and the $dict is the list of properties with according value. Pay attention as in this case you have to pass the complete property definition, not only the id.&lt;BR /&gt;&lt;BR /&gt;good luck!&lt;BR /&gt;&lt;BR /&gt;ciao&lt;BR /&gt;marco&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Jan 2015 07:33:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-updating-properties-on-multiple-files/m-p/5462228#M9821</guid>
      <dc:creator>marco.mirandola</dc:creator>
      <dc:date>2015-01-08T07:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Data Standard - Updating Properties on Multiple Files</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-updating-properties-on-multiple-files/m-p/6523900#M9822</link>
      <description>&lt;P&gt;I did something similar recently and it works great for a handful of files. However,&amp;nbsp;I find $vaultExplorerUtil.UpdateFileProperties() to be painfully slow if you update dozends or even hundreds of files. Using coolOrange PowerVault to do the updating seems (didn't Benchmark it) a little faster while native Vault Explorer property editing via UI is much faster.&lt;/P&gt;&lt;P&gt;The Vault Explorer UI being unresponsive for minutes without any indication what is going on is rather unfortunate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody of you do mass editing like this, too? How do you manage progress reporting?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to background the logic doing the property editing via &lt;STRONG&gt;Start-Job&lt;/STRONG&gt; because I hoped Vault Explorer would remain usable throughout the Operation this way,&amp;nbsp;but then the script seems to do nothing at all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts on this?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 22:37:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-updating-properties-on-multiple-files/m-p/6523900#M9822</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-25T22:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Data Standard - Updating Properties on Multiple Files</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-updating-properties-on-multiple-files/m-p/6532183#M9823</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;I find $vaultExplorerUtil.UpdateFileProperties() to be painfully slow if you update dozends or even hundreds of files. [...]&amp;nbsp;while native Vault Explorer property editing via UI is much faster.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That was my bad, I fear. Further testing showed API call and UI usage to be more or less equal in speed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;How do you manage progress reporting?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to background the logic doing the property editing via &lt;STRONG&gt;Start-Job&lt;/STRONG&gt; because I hoped Vault Explorer would remain usable throughout the Operation this way,&amp;nbsp;but then the script seems to do nothing at all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I use Powershell runspaces now and it works fine!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2016 19:38:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-updating-properties-on-multiple-files/m-p/6532183#M9823</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-30T19:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Data Standard - Updating Properties on Multiple Files</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-updating-properties-on-multiple-files/m-p/6532197#M9824</link>
      <description>To be honest I would have to agree with you on speed issues unfortunately at this point the util.UpdateFileProperties is the method that we are using in our development just due to the complexity of updating properties using the API.&lt;BR /&gt;&lt;BR /&gt;I would hope someone would be able to provide some sort of sample that would show how to updates hundreds if not thousands of files when all files need to have the same values applied for a specific set of Properties.&lt;BR /&gt;&lt;BR /&gt;Fortunately the programming I am working on right now is more specific than that each file requires unique values to be applied and the UpdateFileProperties appear to be the best approach.&lt;BR /&gt;&lt;BR /&gt;If you happen to find a solution I would be grateful if you would share.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Bruce</description>
      <pubDate>Tue, 30 Aug 2016 19:46:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-updating-properties-on-multiple-files/m-p/6532197#M9824</guid>
      <dc:creator>BruceMcKee</dc:creator>
      <dc:date>2016-08-30T19:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Data Standard - Updating Properties on Multiple Files</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-updating-properties-on-multiple-files/m-p/6532375#M9825</link>
      <description>&lt;P&gt;What I wanted to say was: Yes, it is quite slow, but it is not significantly slower than using the native UI. So i figured I couldn't ask for more.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As it turns out, I was wrong again. I did a new testrun just now: I updated one property with a new value on 780 files between 0 byte and 117 Mbyte.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My first impression was quite right - the UI method is much faster than my Powershell script, about 5.5 times faster.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2016 21:19:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-updating-properties-on-multiple-files/m-p/6532375#M9825</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-30T21:19:13Z</dc:date>
    </item>
  </channel>
</rss>

