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

Hi @vdcrocks7 

For this you can use referenced documents instead of occurrences. Referenced document is the document all of the same occurrence reference so their is only one. See article here on working with assemblies and look for paragraph Reference Documents.

 

Sub Main
    ShowReferences()
End Sub

Public Sub ShowReferences()
    ' Get the active assembly.
    Dim oAsmDoc As AssemblyDocument
     oAsmDoc = ThisApplication.ActiveDocument
    ' Get all of the referenced documents.
    Dim oRefDocs As DocumentsEnumerator
     oRefDocs = oAsmDoc.AllReferencedDocuments

    ' Iterate through the list of documents.
    Dim oRefDoc As Document
    For Each oRefDoc In oRefDocs
        
      Logger.Info(oRefDoc.DisplayName)
    Next
End Sub

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan