Hi @felix.bouchard ,
ooops! I thought I had that in there. ( I wrote this using a different method at first and then changed my mind and apparently dropped the CC line in doing so).
Give this a try ( note, I didn't test it just now, so post back it this doesn't work).
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Dim NoDrawingList As String
Dim HasDrawingList As String
Dim oDoc As Document = ThisApplication.ActiveDocument
If oDoc.DocumentType <> DocumentTypeEnum.kAssemblyDocumentObject Then Exit Sub
For Each xDoc As Document In oDoc.AllReferencedDocuments
If xDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject Then
If xDoc.ComponentDefinition.IsContentMember = True Then Continue For
End If
oPath = IO.Path.GetDirectoryName(xDoc.FullFileName)
oModelName = IO.Path.GetFileName(xDoc.FullFileName)
oName = IO.Path.GetFileNameWithoutExtension(xDoc.FullFileName) & ".idw"
oDrawingFilePath = oPath & "\" & oName
If System.IO.File.Exists(oDrawingFilePath) = True Then
HasDrawingList = HasDrawingList & vbLf & oModelName
Else
NoDrawingList = NoDrawingList & vbLf & oModelName
End If
Next
MsgBox("has drawing:" & vbLf & HasDrawingList & vbLf & vbLf & "has NO drawing:" & vbLf & NoDrawingList, , "iLogic")