Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic to Delete Sketched Symbol from the IDW

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
tuliobarata
2817 Views, 4 Replies

iLogic to Delete Sketched Symbol from the IDW

Hey all!

 

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 ?

 

thanks!

 

Túlio Barata

IV 2013
4 REPLIES 4
Message 2 of 5
harco
in reply to: tuliobarata

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.

Message 3 of 5
tuliobarata
in reply to: harco

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!

 

Túlio Barata

IV 2013
Message 4 of 5
tuliobarata
in reply to: tuliobarata

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!


Túlio Barata

IV 2013
Message 5 of 5
israel.parker
in reply to: tuliobarata

HI , i need to delete sketches whith ilogic rule from the .ipt       ....  do you know the function or code ?

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

Post to forums  

Autodesk Design & Make Report