i am trying to find get the reference element linked to external reference.please find the attached image in more clarity and below code running in CATPART.enter image description her
Sub cattmain()
Dim CATDoc As PartDocument
Set CATDoc = catia.ActiveDocument
Dim Opart As Part
Set Opart = CATDoc.Part
Dim exter As Object
Set exter = Opart.HybridBodies.Item(2).HybridShapes
For i = 1 To exter.Count
Dim externmae
Set externmae = exter.Item(i)
Dim ref1 As Reference
Set ref1 = exter.Item(i).GetConstraintElement(1)
Dim constname 'As String
constname = ref1.name
Debug.Print constname
Next
End Sub
i am facing error in this line ” Set ref1 = exter.Item(i).GetConstraintElement(1)”.any suggestion would be apricated.
1