Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Got it - should be:

 

Sub Test()
Dim app As Application
Dim Doc As Document
Dim CompDef As ComponentDefinition
Dim MsgBody As String

Set app = ThisApplication
Set Doc = app.ActiveDocument

Select Case Doc.DocumentType
Case DocumentTypeEnum.kPartDocumentObject
    MsgBody = "Part File"
    Set CompDef = Doc.ComponentDefinition
    If CompDef.IsiPartFactory Then MsgBody = "Multi-config Part Factory"
    If CompDef.IsiPartMember Then MsgBody = "Multi-config Part Member"
Case DocumentTypeEnum.kDrawingDocumentObject
    MsgBody = "Plain Drawing File"
    Dim DocM As Document
    If Doc.ReferencedDocuments.Count > 0 Then
        Set DocM = Doc.ReferencedDocuments.Item(1)
        Set CompDef = DocM.ComponentDefinition
        Select Case DocM.DocumentType
        Case DocumentTypeEnum.kPartDocumentObject
            MsgBody = "Part Drawing File"
            If CompDef.IsiPartFactory Then MsgBody = "Multi-config Part drawing Factory"
            If CompDef.IsiPartMember Then MsgBody = "Multi-config Part drawing Member"
        Case DocumentTypeEnum.kAssemblyDocumentObject
            MsgBody = "Assy Drawing File"
            If CompDef.IsiAssemblyFactory Then MsgBody = "Multi-config Assy drawing Factory"
            If CompDef.IsiAssemblyMember Then MsgBody = "Multi-config Assy drawing Member"
        End Select
    End If
Case DocumentTypeEnum.kAssemblyDocumentObject
    MsgBody = "Assy File"
    Set CompDef = Doc.ComponentDefinition
    If CompDef.IsiAssemblyFactory Then MsgBody = "Multi-config Assy Factory"
    If CompDef.IsiAssemblyMember Then MsgBody = "Multi-config Assy Member"
End Select
MsgBox (MsgBody)

End Sub

Anyway solution is yours.. Thanks!

 

Please vote for Inventor-Idea Text Search within Option Names