Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

CATIA VBA Remove Drawing Text Associative Element

Status
Not open for further replies.

weagan22

Aerospace
Aug 27, 2015
79
US

Does anyone know how to remove an associated element from a drawing text? I know how to add one, but I am running into an issue in the case where the associative element being added already has a link to the first element e.g. uText2 has uText1 as an associative element in the code below.

Sub CATMain()
Dim uText1 as DrawingText
Dim uText2 as DrawingText

Set uText1 = CATIA.ActiveDocument.Selection.Item2(1).Value
Set uText2 = CATIA.ActiveDocument.Selection.Item2(2).Value

uText2.AssociativeElement = Nothing
uText2.AssociativeElement.Delete
uText2.AssociativeElement.Remove
???????????


uText1.AssociativeElement = uText2

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top