How do you retrieve a sketch symbol from a drawing

How do you retrieve a sketch symbol from a drawing

ATahaRYKKE
Contributor Contributor
169 Views
1 Reply
Message 1 of 2

How do you retrieve a sketch symbol from a drawing

ATahaRYKKE
Contributor
Contributor

I'm having trouble finding how to delete a leftover sketch symbol (It's on the sheet) after replacing a titleblock. I tried searching the API manual, but I can't find how to select an object or how to determine the object type

 

 

Nevermind I figured it out

 

here is the code for those curious

 

  ' Deletes Logo Sketch Symbol
Dim oDrawDoc As DrawingDocument = ThisApplication.ActiveDocument

'Loop through sheets
For Each oSheet In oDrawDoc.Sheets 
	'Loop through each symbol
	For Each oSymbol In oSheet.SketchedSymbols
		'look for the symbol by name
		If oSymbol.Name = "LOGO" Then
			oSymbol.Delete
		End If
	Next
Next

 

0 Likes
170 Views
1 Reply
Reply (1)
Message 2 of 2

Curtis_Waguespack
Consultant
Consultant

Hi @ATahaRYKKE , I think you were very close,

 

edit: nevermind, I see that you figured it out

EESignature

0 Likes