[quote user="Cata M"]The reference file and the active model have the same name[/quote]
You can distinguish between reference files by assigning a logical name to each one. Each logical name in a set of attachments must be unique. Then you can do this...
Dim oAttachment As Attachment Set oAttachment = ActiveModelReference.Attachments.FindByLogicalName ("Cata 01")
[quote user="Cata M"]How can I select all elements on one or more levels in a reference?[/quote]
- Scan your attachment for elements on required level(s)
- Add each found element to a selection set
There are examples of scanning in VBA help and in this article.