<?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: Automating updates to drawings in the Vault in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/automating-updates-to-drawings-in-the-vault/m-p/5676399#M9431</link>
    <description>&lt;P&gt;Final post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't want to be spamming these boards if no one has anything they would like to add, so this will be my last update. &amp;nbsp;I figured out everything I need to make this work, but I do have one final question. &amp;nbsp;When I use the&amp;nbsp;WebServiceManager.PropertyService.GetPropertiesByEntityIds() function to get a file's current properties, the array returned doesn't quite match up with the list of properties I get when I use&amp;nbsp;WebServiceManager.PropertyService.GetPropertyDefinitionInfosByEntityClassId().&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, on one file I am looking at "Description" is index 39 in&amp;nbsp;&lt;SPAN&gt;GetPropertyDefinitionInfosByEntityClassId(), but it is index 25 in&amp;nbsp;GetPropertiesByEntityIds(). &amp;nbsp;Does anyone know why?&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;The reason I ask is that I am using the&amp;nbsp;GetPropertyDefinitionInfosByEntityClassId() function to get a list of available file properties, and I'd like for the user to be able to click on a property in a &amp;nbsp;list and see the current / enter a new value. &amp;nbsp;Right now I was having them click on a property, and use that index # when I update the file (which seems to work), but when I try to do the same to pulll up the current value it doesn't work because the index numbers don't line up.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 13 Jun 2015 20:00:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-06-13T20:00:36Z</dc:date>
    <item>
      <title>Automating updates to drawings in the Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/automating-updates-to-drawings-in-the-vault/m-p/5670099#M9427</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a scenario that I believe will need some knowledge of the Vault API and I'm hoping to get some direction from you all on where to go to begin my research. &amp;nbsp;We have a great deal of drawings (in the thousands) in our Vault that need to be updated. &amp;nbsp;We are shortly going to be going through the process of updating item records in our ERP database, and we would like to take those mass updates from our SQL database&amp;nbsp;and push them out to the Vault to avoid forcing our Engineers to open all these drawings, perform 2-3 updates, and republish (mainly we are renaming drawings / models, maybe a few iProperty changes). &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As one of the resident IT guys I was asked to look into how we might automate&amp;nbsp;pushing these thousands of changes to the Vault. &amp;nbsp;I have no experience with the Vault itself. &amp;nbsp;My background is in SQL Databases, VBA, some C# / java etc. &amp;nbsp;What I'm looking for is any input from you on approaches to take, API calls to learn, maybe some&amp;nbsp;tutorials or tools...essentially anything that can get me started down this path.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any resources&amp;nbsp;or input would be greatly appreciated.&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;</description>
      <pubDate>Tue, 09 Jun 2015 13:48:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/automating-updates-to-drawings-in-the-vault/m-p/5670099#M9427</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-09T13:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Automating updates to drawings in the Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/automating-updates-to-drawings-in-the-vault/m-p/5670159#M9428</link>
      <description>&lt;P&gt;A good place to start would be &lt;A href="http://help.autodesk.com/view/VAULT/Help/ENU/?guid=GUID-F21E7DD6-39E9-473C-84BB-3446BCAFCCC0" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Dave&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2015 14:19:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/automating-updates-to-drawings-in-the-vault/m-p/5670159#M9428</guid>
      <dc:creator>minkd</dc:creator>
      <dc:date>2015-06-09T14:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Automating updates to drawings in the Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/automating-updates-to-drawings-in-the-vault/m-p/5672620#M9429</link>
      <description>&lt;P&gt;Thanks Dave!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've been glancing over that and there is certainly a lot there. &amp;nbsp;I guess for my purposes I'm looking for&amp;nbsp;how to do just a few basic tasks. &amp;nbsp;I am thinking all I need is h&lt;SPAN&gt;ow to&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;reach out and update a file and some of its properties.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Something like&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;object = OpenFile('drawing123.dwf');&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;object.SetiProperty('propertyName',Value);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;object.property.DrawingName = 'NewName';&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;object.Publish();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a library of API calls somewhere? &amp;nbsp;I assume there is and I am just having trouble finding it for some reason.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2015 20:20:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/automating-updates-to-drawings-in-the-vault/m-p/5672620#M9429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-10T20:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Automating updates to drawings in the Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/automating-updates-to-drawings-in-the-vault/m-p/5675160#M9430</link>
      <description>&lt;P&gt;Ok,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I've been doing my homework and this is what I have so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 1:&lt;/STRONG&gt; Learn How to Login / Authenticate to the Vault:&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; &amp;nbsp; Via GUI :&amp;nbsp;&lt;A target="_blank" href="https://www.youtube.com/watch?v=2ytpvxlED7s"&gt;https://www.youtube.com/watch?v=2ytpvxlED7s&lt;/A&gt;&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; &amp;nbsp; For my purpose I am just hard coding it for now:&amp;nbsp;&amp;nbsp;&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; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;using VDF = Autodesk.DataManagement.Client.Framework; 

..... 

VDF.Vault.Results.LogInResult results = VDF.Vault.Library.ConnectionManager.LogIn( "serverName", "VaultName", "userName", "Password", VDF.Vault.Currency.Connections.AuthenticationFlags.Standard, null ); 


//close if failure 

if (!results.Success) return; 

VDF.Vault.Currency.Connections.Connection conn = results.Connection;&lt;/PRE&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;&lt;STRONG&gt;Step2:&lt;/STRONG&gt; Learn how to&amp;nbsp;get a file (given a known path)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            string path = "$/Test vault/test inventor projects/LIBRARY2/C2v171-XX3.idw";
            //Need array for findLatestDocuments
            string[] paths = new string[1];
            //Assign array 0 as your path
            paths[0] = path;
            //get file and load into files array
            Autodesk.Connectivity.WebServices.File[] files = conn.WebServiceManager.DocumentService.FindLatestFilesByPaths(paths);
            //dump name to textbox to test
            textBox1.Text = files[0].Name.ToString();&lt;/PRE&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;&lt;STRONG&gt;Step 3:&lt;/STRONG&gt; Get a list of available File properties&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            ////Get list of properties
            PropDefInfo[] propDefs = conn.WebServiceManager.PropertyService.GetPropertyDefinitionInfosByEntityClassId("FILE",null);

            ////dump to listbox to test
            foreach (PropDefInfo propDef in propDefs)
            {
                this.listBox1.Items.Add(propDef.PropDef.SysName.ToString() );
            }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 4:&lt;/STRONG&gt; View current file property values / learn to access a specific properties (by sysName?)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Struggling with this one a little. &amp;nbsp;Mosty just trying to figure out the correct syntax. I am looking at the&amp;nbsp;&lt;EM&gt;PropertyService.GetProperties()&lt;/EM&gt; function but I am&amp;nbsp;a little confused. &amp;nbsp;It is expecting&amp;nbsp;as arguments a string representing the classID, which I assume is "FILE", but the other two arguments are &lt;STRONG&gt;long[] entityIds&amp;nbsp;&lt;/STRONG&gt;and&amp;nbsp;&lt;STRONG&gt;long[] propertyDefIds&lt;/STRONG&gt;. &amp;nbsp;I'm not sure how to pass those values. &amp;nbsp;I was originally thinking it would be something like file[0].Entity or file[0].PropertyName.Entity etc... but I am way off base.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 5:&lt;/STRONG&gt; Learn how to update the file properties.&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; &amp;nbsp;Still a WIP. &amp;nbsp;I saw this example (&lt;A target="_self" href="https://forums.autodesk.com/t5/vault-customization/data-standard-updating-properties-on-multiple-files/m-p/5461526/highlight/true#M2829"&gt;link&lt;/A&gt;) and am trying to modify that. &amp;nbsp;According to &lt;A target="_self" href="https://forums.autodesk.com/t5/vault-customization/problem-with-updating-udp-quot-title-quot-using-bidirectional/td-p/3678766"&gt;this source&lt;/A&gt;&amp;nbsp;I need to use&amp;nbsp;&lt;SPAN&gt;&lt;EM&gt;IExplorerUtil.UpdateFileProperties&lt;/EM&gt; if I want to update the properties in the Vault and in the file itself. &amp;nbsp;As I understand it, &lt;EM&gt;IExplorerUtil.UpdateFileProperties&lt;/EM&gt; requires a reference to&amp;nbsp;&lt;EM&gt;Autodesk.Connectivity.Explorer.ExtensibilityTools.dll&lt;/EM&gt; which I don't seem to have. &amp;nbsp;I did some more searching and found &lt;A target="_self" href="http://justonesandzeros.typepad.com/blog/2011/09/autodeskconnectivityexplorerextensibilitytoolsdll.html"&gt;this source&lt;/A&gt;&amp;nbsp;where Doug Redmond mentions&amp;nbsp;I need the vault client, so I am trying to get the installation media to get that installed on my machine. &amp;nbsp;Once done I am hoping the dll will be installed and the code&amp;nbsp;will be something to the tune of:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dictionary&amp;lt;Autodesk.Connectivity.WebServices.PropDef,String&amp;gt;  dict  = new Dictionary&amp;lt;Autodesk.Connectivity.WebServices.PropDef,String&amp;gt;();

dict.Add(propDefs[5].PropDef, "New Description Value"); //etc

IExplorerUtil.UpdateFileProperties(files[0], dict);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;STRONG&gt;Summary / Questions&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;As you can see I'm making progress but still have issues. &amp;nbsp;If anyone has any input or advise on&amp;nbsp;steps 4/5&amp;nbsp;I would greatly appreciate it. &amp;nbsp;Specifically I am trying to work out the entityIds for the&amp;nbsp;GetProperties() function, and how to properly use the &amp;nbsp;&lt;EM&gt;IExplorerUtil.UpdateFileProperties()&lt;/EM&gt; function. &amp;nbsp;With these steps figured out I can pull in my SQL data and loop through the files that need to be updated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My apologies if this is rudamentary to any of you guys. &amp;nbsp;My background is in databases, not programming.&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;</description>
      <pubDate>Fri, 12 Jun 2015 14:21:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/automating-updates-to-drawings-in-the-vault/m-p/5675160#M9430</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-12T14:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Automating updates to drawings in the Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/automating-updates-to-drawings-in-the-vault/m-p/5676399#M9431</link>
      <description>&lt;P&gt;Final post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't want to be spamming these boards if no one has anything they would like to add, so this will be my last update. &amp;nbsp;I figured out everything I need to make this work, but I do have one final question. &amp;nbsp;When I use the&amp;nbsp;WebServiceManager.PropertyService.GetPropertiesByEntityIds() function to get a file's current properties, the array returned doesn't quite match up with the list of properties I get when I use&amp;nbsp;WebServiceManager.PropertyService.GetPropertyDefinitionInfosByEntityClassId().&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, on one file I am looking at "Description" is index 39 in&amp;nbsp;&lt;SPAN&gt;GetPropertyDefinitionInfosByEntityClassId(), but it is index 25 in&amp;nbsp;GetPropertiesByEntityIds(). &amp;nbsp;Does anyone know why?&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;The reason I ask is that I am using the&amp;nbsp;GetPropertyDefinitionInfosByEntityClassId() function to get a list of available file properties, and I'd like for the user to be able to click on a property in a &amp;nbsp;list and see the current / enter a new value. &amp;nbsp;Right now I was having them click on a property, and use that index # when I update the file (which seems to work), but when I try to do the same to pulll up the current value it doesn't work because the index numbers don't line up.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jun 2015 20:00:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/automating-updates-to-drawings-in-the-vault/m-p/5676399#M9431</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-13T20:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Automating updates to drawings in the Vault</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/automating-updates-to-drawings-in-the-vault/m-p/5681777#M9432</link>
      <description>&lt;P&gt;Sorry. I was in a training class and then had a couple days of vacation ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are getting all possible property defs for any files, and then getting property values for specific files; but not all files will have values for every possible property def.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In many Vault API methods the input array of ids is in sync with the array of returned objects; but there is no correlation between different methods other than common IDs; and not all methods follow this pattern. The PropertyService.GetPropertiesByEntityIds method is one that does not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The PropertyService.GetPropertiesByEntityIds method returns an array of PropInst objects. Each of those has an EntityId (which should match an Id in the entityIds parameter), a PropDefId (which should match the Id of the PropDef), and of course the value (Val).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;-Dave&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2015 21:10:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/automating-updates-to-drawings-in-the-vault/m-p/5681777#M9432</guid>
      <dc:creator>minkd</dc:creator>
      <dc:date>2015-06-17T21:10:13Z</dc:date>
    </item>
  </channel>
</rss>

