Data Standards Define Category in Inventor

Data Standards Define Category in Inventor

Anonymous
Not applicable
4,688 Views
21 Replies
Message 1 of 22

Data Standards Define Category in Inventor

Anonymous
Not applicable

Hi,

 

I'm in the process of trying to setup data standards but I am falling at the first hurdle from inventor.

 

When I select a category and check file in the file is not categorised in vault,looking at the file it isn't writing to a property that i can apply a rule against to categorise and data standards doesn't seem to apply the category i have selected on check-in.

 

How do i setup the mapping of the category drop down to a property? Or is there a better way of setting this up?

 

Thanks in advance for any help.

 

 

 

0 Likes
Accepted solutions (1)
4,689 Views
21 Replies
Replies (21)
Message 21 of 22

marco.mirandola
Advocate
Advocate

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
0 Likes
Message 22 of 22

emileHGKX6
Explorer
Explorer

This worked like a charm, thanks for the help. 🙂

 

greetings

Jonas

 

 

 

0 Likes