Hi Stuart, if you like to have Vault appling the according category as selected within the VDS dialog, then you'll need a custom property in Inventor and Vault that are mapped and you'll need to fill the property in Inventor. I made a quick test and it worked nicely.
I did add a new property in the C:\ProgramData\Autodesk\Vault 2016\Extensions\DataStandard\CAD\Configuration\Inventor.cfg calles _Category like this:
....
<PropertyDefinitions>
....
....
<PropertyDefinition PropertyName="_Category" DataType="Text"/>
</PropertyDefinitions>
...
I've tried with just Category, but it did not work. I guess the property is somehow alreay used internally, so _Category worked for me.
Then i've added two lines in the OnPostCloseDialog function like this:
function OnPostCloseDialog
{
$mWindowName = $dsWindow.Name
switch($mWindowName)
{
"InventorWindow"
{
#rules applying for Inventor
$ctx = $dsWindow.DataContext
$Prop["_Category"].Value = $ctx.DynamicPropertiesCategory.Name
}
....
.....
bascially, once the files is going to be saved, i extract from the dialog the selected categry and store it inside my property. The syntax here is somehow cryptic as it uses an internal property. But, it works...
now i have in Vault a custom property called _Category which is mapped to the according propety of the Inventor file. And then i have rules based on the value of this property (Engineering = Engineering, Office = Office, etc.)
find attached the cfg and ps1 file i've used.
i hope this helps
ciao
marco
coolOrange
www.coolorange.com