If taking the next logical step, and checking DocumentSubType, there are a couple other tips that you may find useful.
Most of us who have been writing code to automate Inventor for a while have come across the following common properties of the Document object, and attempted to use them.
Document.DocumentSubType
Document.SubType
That first one 'DocumentSubType' appears to now be 'retired', because we can no longer find any further information about how to check its value within the online help documentation, and the links to the value type it returns are now broken. However, it seems as though Autodesk has chosen to continue supporting its functionality in the background, to keep from 'breaking' the functionality of 'legacy' solutions, for now. It claims to return a value that is DocumentSubType Type (not a String or Enum), and when we look older code examples using it, they use it like this [Document.DocumentSubType.DocumentSubTypeID = ], which indicates that value Type was an object that had a property named 'DocumentSubTypeID, which had a String type value, which was one of those long GUID type, unreadable pattern of letters, numbers, & symbols.
The second one 'Document.SubType' actually returns the same value as 'Document.DocumentSubType.DocumentSubTypeID' did, and does so with far less code or complication.
However, both of them leave us with a value we can not directly read, or understand clearly.
And, there is yet another way to get that same value from a Document, through its standard iProperties, in its third PropertySet named 'Design Tracking Properties' (aka 'Project'), and its property at index 16, named 'Document SubType'.
However, if you want a value that you can actually read, and understand, we can use the very next iProperty in that same set, named 'Document SubType Name' (index 17). If it is a regular part, it will return "Modeling" (for some reason), if a sheet metal part, it will contain "Sheet Metal" text, if regular assembly, it will contain "Assembly" text, if a weldment type assembly, it will contain "Weldment" text, and so on. This same exact value can be seen within the standard iProperties dialog, on the Project tab, beside the label "File Subtype:" in every document.
The last year or two, I have mostly switched from checking SubType using any of the above mentioned ways, to using the 'TypeOf' operator on the ComponentDefinition object directly, instead. It seems to require less code, and is equally easy to read and understand (at least for me). This is because pretty much every SubType has a unique type of ComponentDefinition to match it, and then some. ComponentDefinition is a base type, which has several other, more specific types derived from it, for special purposes/uses. And some of those sub types even have other more specific sub types derived from them also. At this point in my codes, I am usually about to declare a variable for the ComponentDefinition anyways, which usually requires me typing that TypeName anyways, so this is another relatively efficient and logical way to check it.
Below is a simple iLogic rule which extracts that same SubTypeID value from the Document object in all 3 ways that I know of, plus shows the 'readable' way I mentioned, but does not show the 'TypeOf' check on the ComponentDefinition, because it does not fit this situation very well.
Dim oDoc As Inventor.Document = ThisDoc.Document
Dim sSubType_ID_1 As String = oDoc.DocumentSubType.DocumentSubTypeID
Dim sSubType_ID_2 As String = oDoc.SubType
Dim sSubType_ID_3 As String = oDoc.PropertySets.Item(3).Item(16).Value
Dim sSubTypeName As String = oDoc.PropertySets.Item(3).Item(17).Value
MessageBox.Show("Document SubType Info:" & vbCrLf & _
"Document.DocumentSubType.DocumentSubTypeID = " & sSubType_ID_1 & vbCrLf & _
"Document.SubType = " & sSubType_ID_2 & vbCrLf & _
"'Document SubType' iProperty Value = " & sSubType_ID_3 & vbCrLf & _
"'Document SubType Name' iProperty Value = " & sSubTypeName, _
"This Document's SubType Info", MessageBoxButtons.OK, MessageBoxIcon.Information)
Wesley Crihfield

(Not an Autodesk Employee)