01-17-2017
05:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
01-17-2017
05:33 AM
Hey, here you go:
' Define the open document
Dim aDoc As Document = ThisApplication.ActiveDocument
If aDoc Is Nothing Then Exit Sub
' Look at all of the files referenced in the open document
For Each oDoc As Inventor.Document In aDoc.AllReferencedDocuments
Dim FName As String = oDoc.FullFileName
If oDoc.DocumentSubType.DocumentSubTypeID = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
MsgBox(FName & vbnewline & "is a sheetmetal part.")
ElseIf oDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject Then
MsgBox(FName & vbnewline & "is a normal part.")
End If
Next
Consider using "Accept as Solution" / "Kudos" if you find this helpful.
- - - - - - - - - - - - - - -
Regards,
Mike
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - John F. Woods
- - - - - - - - - - - - - - -
Regards,
Mike
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - John F. Woods