Community
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create Enum for DocumentSubType &/or Document.SubType

Create Enum for DocumentSubType &/or Document.SubType

Please create a DocumentSubTypeEnum or other simpler and readable way to determine if a document is a Sheet Metal Part, or Weldment Assembly, or other SubType's.  DocumentSubType and Document.SubType have to reference a long, unreadable string (GUID) or DocCLSIDs.h.  Having to specify one or multiple of those long strings for comparison, to determine SubType is really, really horrible!  I don't want to have to run through a long series of If...ElseIf... statements or Select Case statements or run seperate iLogic rule or module, every time, just to get this information.  It should be really simple to do, but it currently is not.

Please build something easier to use, and readable, into Inventor's iLogic and/or Inventor's VBA system.

2 Comments
WCrihfield
Mentor

The best workaround I've come up with, to get the readable SubType is to access the iProperty.

Within the "Design Tracking Properties" PropertySet...(AKA - PropertySets.Item(3)) /

Property number 16, which is "Document SubType".

And Property number 17, which is "Document SubType Name".

I know...pretty self explanatory.

Obviously the value of the second one will return the 'readable' SubType.

And since this PropertySet and this Property are both standard, this seems like a viable alternative to having to use the list of long 'unreadable' strings, to determine DocumentSubType & Document.SubType.

WCrihfield
Mentor

Just adding links in here to a couple of my related contribution posts for reference.  (And hopefully bump the topic back up in recent ideas activity, for better advertisement and more votes. 🙂)

Document.SubType List (Common Name = Inventor's Name = CSLID) (from Inv Pro 2021 Dev Tools)

Determine Document.DocumentSubType (or Document.SubType) (Recently Updated to include new technique)

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Autodesk Design & Make Report