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

Found it:

SyntaxEditor Code Snippet

'Part file
If oDoc.DocumentType = Inventor.DocumentTypeEnum.kPartDocumentObject And oDoc.SubType <> "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
    If oDoc.ComponentDefinition.IsiPartFactory Or oDoc.ComponentDefinition.IsiPartMember Then
        MessageBox.Show("This is a iPart", "iPart")
        Return
    End If
    MessageBox.Show("This ia a Part", "Part")

'Assembly file
Else If oDoc.DocumentType = Inventor.DocumentTypeEnum.kAssemblyDocumentObject Then
    If oDoc.ComponentDefinition.IsiAssemblyFactory Or oDoc.ComponentDefinition.IsiAssemblyMember Then
        MessageBox.Show("Dit is een iAssembly", "Title")
        Return
    End If
    MessageBox.Show("Dit is een Assembly", "Title")
End If
Robert

If you find this reply helpful ? It would be nice if you use the Accept as Solution or Kudos button below.