Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get Sub Type Property of IPT file when I have a "IDW" file open

1 REPLY 1
Reply
Message 1 of 2
isocam
285 Views, 1 Reply

Get Sub Type Property of IPT file when I have a "IDW" file open

Can anybody help???

 

I have a "IDW" file open on screen containing a part "IPT".

 

How, using Inventor VBA, do I get the "file sub type property" of the "IPT" File (eg Sheet Metal) when I am in the "IDW" file.

 

Many thanks in advance!!!

 

IsoCAM

1 REPLY 1
Message 2 of 2
Anonymous
in reply to: isocam

Public Sub Part_Type()
    Dim oDoc As DrawingDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    Dim oSheet As Sheet
    Set oSheet = oDoc.ActiveSheet
    
    Dim oPart As PartDocument
    Set oPart = oSheet.DrawingViews.Item(1).ReferencedDocumentDescriptor.ReferencedDocument
    
    If oPart.DocumentSubType.DocumentSubTypeID = "{4D29B490-49B2-11D0-93C3-7E0706000000}" Then
        MsgBox ("This is a normal Part document")
    ElseIf oPart.DocumentSubType.DocumentSubTypeID = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
        MsgBox ("This is a Sheet metal Part document")
    End If
End Sub

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report