Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do you retrieve a sketch symbol from a drawing

1 REPLY 1
Reply
Message 1 of 2
ATahaRYKKE
134 Views, 1 Reply

How do you retrieve a sketch symbol from a drawing

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

 

1 REPLY 1
Message 2 of 2

Hi @ATahaRYKKE , I think you were very close,

 

edit: nevermind, I see that you figured it out

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report