<?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 How to get via API all File Properties and their Values for all Files from the selected Assembly File? in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-get-via-api-all-file-properties-and-their-values-for-all/m-p/12302671#M1370</link>
    <description>&lt;P&gt;Hi, we are building an extension to Vault Professional 2024 Client to allow the user to transfer data from Vault to ERP system via the REST API. Currently the C# code is written to work with Vault Files and their Properties, we could possibly change the approach to work with Vault Items if recommended.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our target would be to get via Vault API all File Properties and their Values for all Files from the selected Assembly File and later to work with them locally (verification, Assembly creation, Child-part creation, …) in order to minimize the number of requests to the Vault server via the API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our today solution works when selected single Part. We are using the PropertyManager.GetPropertyValue to get each File Property Value. When we use the same function on the Assembly which has the same part as the child-part, we could not receive the Category Name, Status , ...&lt;/P&gt;</description>
    <pubDate>Fri, 13 Oct 2023 10:03:38 GMT</pubDate>
    <dc:creator>petr_cizekTGR8C</dc:creator>
    <dc:date>2023-10-13T10:03:38Z</dc:date>
    <item>
      <title>How to get via API all File Properties and their Values for all Files from the selected Assembly File?</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-get-via-api-all-file-properties-and-their-values-for-all/m-p/12302671#M1370</link>
      <description>&lt;P&gt;Hi, we are building an extension to Vault Professional 2024 Client to allow the user to transfer data from Vault to ERP system via the REST API. Currently the C# code is written to work with Vault Files and their Properties, we could possibly change the approach to work with Vault Items if recommended.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our target would be to get via Vault API all File Properties and their Values for all Files from the selected Assembly File and later to work with them locally (verification, Assembly creation, Child-part creation, …) in order to minimize the number of requests to the Vault server via the API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our today solution works when selected single Part. We are using the PropertyManager.GetPropertyValue to get each File Property Value. When we use the same function on the Assembly which has the same part as the child-part, we could not receive the Category Name, Status , ...&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 10:03:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-get-via-api-all-file-properties-and-their-values-for-all/m-p/12302671#M1370</guid>
      <dc:creator>petr_cizekTGR8C</dc:creator>
      <dc:date>2023-10-13T10:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to get via API all File Properties and their Values for all Files from the selected Assembly File?</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-get-via-api-all-file-properties-and-their-values-for-all/m-p/12313062#M1371</link>
      <description>&lt;P&gt;Hi Petr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use PropertyService.GetPropertiesByEntityIds to return all the properties for all of the files (or items)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;PropInst[] fileProperties = propSvc.GetPropertiesByEntityIds("FILE", new long[] { file1.Id, file2.Id, ... fileN.Id});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 02:42:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-get-via-api-all-file-properties-and-their-values-for-all/m-p/12313062#M1371</guid>
      <dc:creator>Nick_Hall</dc:creator>
      <dc:date>2023-10-18T02:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get via API all File Properties and their Values for all Files from the selected Assembly File?</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-get-via-api-all-file-properties-and-their-values-for-all/m-p/12318227#M1372</link>
      <description>&lt;P&gt;Hi Nick, thanks for your reply. Could you please advice as well the best way to get the list of all child-files from the "assembly" file? I found this:&amp;nbsp;GetItemFileAssociationsByItemIds but is not this function only for the Items? Because we work with Files in IExplorer... Thanks Petr&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 23:16:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-get-via-api-all-file-properties-and-their-values-for-all/m-p/12318227#M1372</guid>
      <dc:creator>petr_cizekTGR8C</dc:creator>
      <dc:date>2023-10-19T23:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to get via API all File Properties and their Values for all Files from the selected Assembly File?</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-get-via-api-all-file-properties-and-their-values-for-all/m-p/12318664#M1373</link>
      <description>&lt;P&gt;There are two options to get related files: retrieve all IDs using GetFileAssociationLitesByIds or retrieve all file objects of these using&amp;nbsp;GetFileAssociationsByIds. Sample code is available here:&amp;nbsp;&lt;A href="https://github.com/koechlm/iLogic-Vault/blob/2023.3/iLogic-Vault-QuickstartLibrary/iLogic-Vault%20QuickstartLibrary.cs#L210" target="_blank"&gt;iLogic-Vault/iLogic-Vault-QuickstartLibrary/iLogic-Vault QuickstartLibrary.cs at 2023.3 · koechlm/iLogic-Vault (github.com)&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 05:37:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-get-via-api-all-file-properties-and-their-values-for-all/m-p/12318664#M1373</guid>
      <dc:creator>Markus.Koechl</dc:creator>
      <dc:date>2023-10-20T05:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to get via API all File Properties and their Values for all Files from the selected Assembly File?</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-get-via-api-all-file-properties-and-their-values-for-all/m-p/12325314#M1374</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/33301"&gt;@Markus.Koechl&lt;/a&gt; for saving me the job of replying&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 19:26:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-get-via-api-all-file-properties-and-their-values-for-all/m-p/12325314#M1374</guid>
      <dc:creator>Nick_Hall</dc:creator>
      <dc:date>2023-10-23T19:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to get via API all File Properties and their Values for all Files from the selected Assembly File?</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-get-via-api-all-file-properties-and-their-values-for-all/m-p/12335521#M1375</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7162092"&gt;@Nick_Hall&lt;/a&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/33301"&gt;@Markus.Koechl&lt;/a&gt;, thanks for your feedback. As we go further, we face another issue...&lt;/P&gt;&lt;P&gt;Issue: Different Properties received for single selected file versus same file as component in Assembly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When we select single File (240189.ipt) in Vault, we get correct File properties:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Vault:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="petr_cizekTGR8C_0-1698411571378.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1284757i1353D6DD8C3512F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="petr_cizekTGR8C_0-1698411571378.png" alt="petr_cizekTGR8C_0-1698411571378.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code to get Properties if selected PART:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="petr_cizekTGR8C_1-1698411571393.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1284759iDE2075283C3A31EA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="petr_cizekTGR8C_1-1698411571393.png" alt="petr_cizekTGR8C_1-1698411571393.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PropInfoArray:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="petr_cizekTGR8C_2-1698411571404.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1284758i3005D0AD1B79B7DD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="petr_cizekTGR8C_2-1698411571404.png" alt="petr_cizekTGR8C_2-1698411571404.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In this case, the Part Number (PropDefId = 26) is 240189 which is OK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I select Assembly, which has this File 240189 as a component, we get wrong data…:&lt;/P&gt;&lt;P&gt;Vault selection:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="petr_cizekTGR8C_3-1698411571415.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1284761i6AF883A48FDA9FAB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="petr_cizekTGR8C_3-1698411571415.png" alt="petr_cizekTGR8C_3-1698411571415.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Code to get the ChildFiles for the Assembly:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="petr_cizekTGR8C_4-1698411571432.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1284762iB53C2BE8F0D27B31/image-size/medium?v=v2&amp;amp;px=400" role="button" title="petr_cizekTGR8C_4-1698411571432.png" alt="petr_cizekTGR8C_4-1698411571432.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Received bom object:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="petr_cizekTGR8C_5-1698411571436.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1284760iBF50906735654875/image-size/medium?v=v2&amp;amp;px=400" role="button" title="petr_cizekTGR8C_5-1698411571436.png" alt="petr_cizekTGR8C_5-1698411571436.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;bom CompArray:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="petr_cizekTGR8C_6-1698411571447.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1284763i6AABBB609C92BE89/image-size/medium?v=v2&amp;amp;px=400" role="button" title="petr_cizekTGR8C_6-1698411571447.png" alt="petr_cizekTGR8C_6-1698411571447.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;BOM InstArray:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="petr_cizekTGR8C_7-1698411571453.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1284764iA80F8C0EFF899B81/image-size/medium?v=v2&amp;amp;px=400" role="button" title="petr_cizekTGR8C_7-1698411571453.png" alt="petr_cizekTGR8C_7-1698411571453.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The code to check the Assembly is calling the same function isValidProperties… but the received data for the Child Part are different:&lt;/P&gt;&lt;P&gt;PropInfoArray:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="petr_cizekTGR8C_8-1698411571464.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1284765iF0F9745B2BB41874/image-size/medium?v=v2&amp;amp;px=400" role="button" title="petr_cizekTGR8C_8-1698411571464.png" alt="petr_cizekTGR8C_8-1698411571464.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It is mainly the Part Number and Category Name we have trouble with… but probably not limited to these.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems we are receiving different BOM InstanceId or XRefId (1880778 versus 1850257), but how to get the same Instance from the Assembly file…?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you able to help? Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 13:05:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-get-via-api-all-file-properties-and-their-values-for-all/m-p/12335521#M1375</guid>
      <dc:creator>petr_cizekTGR8C</dc:creator>
      <dc:date>2023-10-27T13:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get via API all File Properties and their Values for all Files from the selected Assembly File?</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-get-via-api-all-file-properties-and-their-values-for-all/m-p/12339609#M1376</link>
      <description>&lt;P&gt;Hi Petr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without having access to your Vault I can't be 100% certain about this, but I think that your assembly is referencing an older version of 240189.ipt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are loads of ways this could happen, so it's quite plausible/likely&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to get the latest version, you can use GetLatestFilesByMasterIds or GetLatestFilesByIds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I've understood correctly, you want to pass an array of CompArray.XRefId to GetLatestFilesByIds, which will give you the latest version of all the BOM Components&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will get a bit messy handling the referenced and latest components, but you should be able to work it out&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it's worth looking into why this is happening, which you can do by cross-checking the version numbers in Vault, and working back from there. It may be that you need to make changes to your workflows and/or lifecycles to ensure the data in Vault &amp;amp; the data in your ERP system match&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 04:47:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-get-via-api-all-file-properties-and-their-values-for-all/m-p/12339609#M1376</guid>
      <dc:creator>Nick_Hall</dc:creator>
      <dc:date>2023-10-30T04:47:06Z</dc:date>
    </item>
  </channel>
</rss>

