<?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: How to Populate a property with Filename? in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-how-to-populate-a-property-with-filename/m-p/6305292#M8490</link>
    <description>&lt;P&gt;Hi Ryan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are couple ways to achieve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could do this in the InitializeWindow function of the Default.ps1 file by setting "Will be generated" value directly to the $Prop["Stock Number"].Value. But you have to figure out well what should happen during the edit operation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another&amp;nbsp;way is to hide the Stock Number property from the dynamic properties grid. Once this property is not displayed the OK button should be enabled to carry on with the creation. This will work well except you don't see the property field anymore. For hiding a property, you should give a look at the VaultDynamicProperties.xml under the C:\ProgramData\Autodesk\Vault 2017\Extensions\DataStandard\Vault\Configuration.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wangdu&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;coolOrange&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.coolOrange.com" target="_blank"&gt;www.coolOrange.com&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 03 May 2016 09:46:16 GMT</pubDate>
    <dc:creator>wangdu</dc:creator>
    <dc:date>2016-05-03T09:46:16Z</dc:date>
    <item>
      <title>Data Standard: How to Populate a property with Filename?</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-how-to-populate-a-property-with-filename/m-p/6301204#M8487</link>
      <description>&lt;P&gt;I am customizing Data Standard for a customer but have run into a small issue. &amp;nbsp; When a file is created using the "New Standard File" command, whatever the resultant filename is, I want to immediately populate a vault property (Stock Number) with the filename minus the extension. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, you click New Standard File, specify your template and select the vault number scheme you want to use. &amp;nbsp;Once OK is selected,&amp;nbsp;the vault generates your file (E00-1234.dwg) but I also want to populate the vault property called Stock Number&amp;nbsp;with&amp;nbsp;&lt;SPAN&gt;E00-1234. &amp;nbsp;Refer to attached screenshot.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Much thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Ryan&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/236061i2FC88C4548616A04/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="filename - new standard file.png" title="filename - new standard file.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2016 20:49:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-how-to-populate-a-property-with-filename/m-p/6301204#M8487</guid>
      <dc:creator>ryan</dc:creator>
      <dc:date>2016-04-29T20:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Data Standard: How to Populate a property with Filename?</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-how-to-populate-a-property-with-filename/m-p/6303127#M8488</link>
      <description>&lt;P&gt;Hi Ryan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For all things to achieve after OK button is clicked, the GetNewFileName function in the Default.ps1 file is the right place.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In that function, all you need to do is set the property's value to the desired value. e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$Prop["Stock Number"].Value = $Prop["_GeneratedNumber"].Value&lt;/PRE&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Wangdu&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;coolOrange&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.coolOrange.com" target="_blank"&gt;www.coolOrange.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2016 07:24:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-how-to-populate-a-property-with-filename/m-p/6303127#M8488</guid>
      <dc:creator>wangdu</dc:creator>
      <dc:date>2016-05-02T07:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Data Standard: How to Populate a property with Filename?</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-how-to-populate-a-property-with-filename/m-p/6303674#M8489</link>
      <description>&lt;P&gt;Thanks for your help, that is &lt;STRONG&gt;almost&lt;/STRONG&gt; perfect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would it be possible to have the Stock Number property pre-populated with the text "Will be generated"? &amp;nbsp;At present, the Stock Number value is required so the user currently has to type something in just to allow them to click the Ok button, even though upon doing so, whatever entered is getting replaced courtesy of the code you previously supplied on this thread.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know in vaults configuration (Tools &amp;gt; Administration &amp;gt; Vault Settings &amp;gt; &amp;nbsp;Properties) I could set the Initial Value of the property; however, I would rather leave it blank and have the "Will ge generated" text pre-populated on the DS side. &amp;nbsp;I should note, I was able to do this easily on the CAD side of the customization by adding IntialValue="Will be generated" for the Stock Number property in the AutoCAD.cfg file but can't figure out how to do the equivalent in Vault.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks so much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Ryan&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2016 13:37:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-how-to-populate-a-property-with-filename/m-p/6303674#M8489</guid>
      <dc:creator>ryan</dc:creator>
      <dc:date>2016-05-02T13:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Data Standard: How to Populate a property with Filename?</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-how-to-populate-a-property-with-filename/m-p/6305292#M8490</link>
      <description>&lt;P&gt;Hi Ryan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are couple ways to achieve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could do this in the InitializeWindow function of the Default.ps1 file by setting "Will be generated" value directly to the $Prop["Stock Number"].Value. But you have to figure out well what should happen during the edit operation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another&amp;nbsp;way is to hide the Stock Number property from the dynamic properties grid. Once this property is not displayed the OK button should be enabled to carry on with the creation. This will work well except you don't see the property field anymore. For hiding a property, you should give a look at the VaultDynamicProperties.xml under the C:\ProgramData\Autodesk\Vault 2017\Extensions\DataStandard\Vault\Configuration.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wangdu&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;coolOrange&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.coolOrange.com" target="_blank"&gt;www.coolOrange.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 09:46:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-how-to-populate-a-property-with-filename/m-p/6305292#M8490</guid>
      <dc:creator>wangdu</dc:creator>
      <dc:date>2016-05-03T09:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Data Standard: How to Populate a property with Filename?</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-how-to-populate-a-property-with-filename/m-p/6310588#M8491</link>
      <description>Thanks again for your help, I was able to accomplish what I needed!&lt;BR /&gt;&lt;BR /&gt;Ryan Small, Technical Specialist&lt;BR /&gt;1.877.438.2231 x110&lt;BR /&gt;2300 Steeles Ave West, Suite 240, Vaughan, ON L4K 5X6&lt;BR /&gt;[[image]]</description>
      <pubDate>Thu, 05 May 2016 17:45:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/data-standard-how-to-populate-a-property-with-filename/m-p/6310588#M8491</guid>
      <dc:creator>ryan</dc:creator>
      <dc:date>2016-05-05T17:45:27Z</dc:date>
    </item>
  </channel>
</rss>

