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

Test is file is iPart or iAssembly

Hi,

To test is a file is an iPart I use:

SyntaxEditor Code Snippet

Dim partDoc As PartDocument = ThisApplication.ActiveDocument
If partDoc.ComponentDefinition.IsiPartFactory Or partDoc.ComponentDefinition.IsiPartMember Then
    MessageBox.Show("This IS an iPart", "Title")
    Return 'do nothing
Else
MessageBox.Show("This is NOT an iPart", "Title")
End If

But what do I need to check if it is an iPart or an iAssembly?

 

I like to run some iLogic on my files, but not on the iPart or iAssembly files.

Robert

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