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

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