I was trying to find an answer for that with the SEARCH here and google also, after read many topics i gave up and like always, trying it direct here
How can I delete one Sketched Symbol from my Drawing ? It wont be in use in any sheet, i just need to delete it and the recreate with my code, so by this way the symbol is updated.
The other part of the code is created already, just need this parte to delete...
I found some ways but just delete the symbol from the sheet, not the source symbol.
How can i delete it then ?
Solved! Go to Solution.
I'm no use at ilogic but another way to do what you want, if the replacement Sketched Symbol will have the same name, is to create your new sketched symbol in a drawing then use the drawing transfer wizard to overwrite this symbol into your other drawings.
Not really what you wanted but I hope this helps.
Hey harco, thanks for the reply man!
Well, i guess that is not gonna work for the thing I'm building here.
The problem is that:
I have one code that creates some notes to put in a drawing (actually many notes), and the best way i've found to control these notes, is creating them into a Symbol....but, when i create them in the symbol, it keeps the old text too..so it becomes a mess, like, if i use the Form to make the notes 3 times in the same IDW, it'll keep those 3 versions of the notes, one over the other...
So my idea is to delete the symbol and recreate it with ilogic, so instead of update, each time the user change the notes, the code would delete all the symbols in the sheets, delete the source symbol and the create a new one with the notes.
Or maybe (just thought it now while writing), i could just clear the symbol if that's easier...just dont know how, but if a could erase all the things inside the symbol, i guess would work great too!!
Thanks very much!
Found it !!!
Here the code that I used, i just got the same code to delete the symbol from all the sheets, changed something and now it deletes from the entire IDW:
Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument
Dim oSketchedSymbolDef As SketchedSymbolDefinition For Each oSketchedSymbolDef In oDrawDoc.SketchedSymbolDefinitions If oSketchedSymbolDef.Name = "Notas Solution" Then oSketchedSymbolDef.Delete Else End If Next
Thanks very much!