Revision Confusion

Revision Confusion

Anonymous
Not applicable
488 Views
1 Reply
Message 1 of 2

Revision Confusion

Anonymous
Not applicable

Vault Professional 2013.

 

Item Card has a revision number. (This is easy to extract and always accurate)

 

File has a (Revision, and a Rev Number property, extractable through get properties) as well as a fileRev.Label property, which is part of the file object.

 

Part of a utility I have written compares the Item Card Revison against the Revision value that is contained within the "iPropeties/Project/Revision Number" field in the Inventor Part/Assembly.

 

I extract thie "file" value by creating a File Object and referencing the "..PropertyService.GetProperties("FILE", new long[] { fileId }, new long[] { 57 })" function. 57 being the ID of the "Rev Number" property.

 

This value does not always seem to be correct. I have confirmed that it "sometimes" comes up "blank" even when I have a value in that field.

 

In cases where I have drawings (that do not link to any models) this value is always an empty string, regardless of what I have in the field.

 

How can I extract this value consistantly and correctly from my files?

0 Likes
489 Views
1 Reply
Reply (1)
Message 2 of 2

minkd
Alumni
Alumni

Two things:

1)      A PropertyDefID is not a constant.  In a vault I have laying around 57 is the ID of the ‘Created’ property of a ForumMessage.

2)      You want the “Revision” property, not the “Rev Number” property.

 

You can get the PropertyDefID of the File’s Revision property with:

                PropertyService.FindPropertyDefinitionsBySystemNames("FILE", new string[] { "Revision" });

 

-Dave



Dave Mink
Fusion Lifecycle
Autodesk, Inc.
0 Likes