Message 1 of 8
VBA script: List first level sub components from assembly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Currently I have some code which loops through all sub components of an assembly and sub assemblies. However I only need sub components inside the top level assembly and not any sub-assemblies. Is there an easy way to acomplish this?
This code will list all sub components inside an assembly when a drawing is open.
Dim oDocument As Document
Set oDocument = ThisApplication.ActiveDocument
Dim oRefDocs As DocumentsEnumerator
Set oRefDocs = oDocument.AllReferencedDocuments
Dim oRefDoc As Document
For Each oRefDoc In oRefDocs
debug.print oRefDoc.FullDocumentName
Next
Check out my style edits for the Autodesk forums
pball's Autodesk Forum Style
Userscript to edit forum links to jump to first unread post
Jump To First Post Userscript
pball's Autodesk Forum Style
Userscript to edit forum links to jump to first unread post
Jump To First Post Userscript