Determining ipt file type

Determining ipt file type

isocam
Collaborator Collaborator
516 Views
2 Replies
Message 1 of 3

Determining ipt file type

isocam
Collaborator
Collaborator

Can anybody help?

 

Is it possible, using Inventors VBA to determine if a "ipt" file is a "Normal File" or a "Sheet Metal File".

 

Say I have created a sheet metal component and a normal component.

 

If i run a VBA macro, can I tell which one is the "Sheet Metal" component?

 

Many thanks in advance!!!

 

 

0 Likes
Accepted solutions (1)
517 Views
2 Replies
Replies (2)
Message 2 of 3

TONELLAL
Collaborator
Collaborator

In the properties, you can use the Sub file type.

0 Likes
Message 3 of 3

Anonymous
Not applicable
Accepted solution
Public Sub PartTest()
    Dim oPartDoc As PartDocument
    Set oPartDoc = ThisApplication.ActiveDocument
    If oPartDoc.ComponentDefinition.Type = kPartComponentDefinitionObject Then
        MsgBox ("Standard part")

    ElseIf oPartDoc.ComponentDefinition.Type = kSheetMetalComponentDefinitionObject Then
        MsgBox ("SheetMetal")
    End If
End Sub