Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
i found a code that gives all referenced files by the assembly back. Even files by sub-assemblies.
'- - - - - - - - - - - - -Component Drawings - - - - - - - - - - - -'look at the files referenced by the assembly Dim oRefDoc As Document Dim fileName As String ' For Each oRefDoc In oRefDocs = oAsmDoc.AllReferencedDocuments For Each oRefDoc In oAsmDoc.AllReferencedDocuments oFileName = Left(oRefDoc.DisplayName, Len(oRefDoc.DisplayName) - 4) For Each fileName In System.IO.Directory.GetFiles(oPath1, "*.idw",System.IO.SearchOption.AllDirectories) If fileName.EndsWith(oFileName + ".idw") = True Then Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.Documents.Open(fileName, True) On Error Resume Next
I like to have a modification, so that the code only gives referenced files from the assembly NOT from the sub-assemblies. Is that possible?
Need your help.
Thanks in advance
Regards from Germany...
Martin
Solved! Go to Solution.