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

@floccipier 

 

Try this!

 

Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition

'Iterate through all of the occurrences
Dim oOccurrence As ComponentOccurrence
Dim oList As New List(Of Integer)

For Each oOccurrence In oAsmCompDef.Occurrences

	If oOccurrence.Visible = True Then
	
	oList.Add(oAsmCompDef.Occurrences.Count)
End If
x1 = oList.Count

Next

MessageBox.Show(x1, "Number of VisibleComponents")

 


Bhavik Suthar