Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MintJulep 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
Joined
Aug 27, 2015
Messages
81
Location
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