Inventor General Discussion

Reply
Mentor
tuliobarata
Posts: 164
Registered: ‎11-30-2007
Message 1 of 5 (487 Views)
Accepted Solution

iLogic to Delete Sketched Symbol from the IDW

487 Views, 4 Replies
11-05-2012 05:57 AM

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 :smileyhappy:

 

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
*Expert Elite*
harco
Posts: 879
Registered: ‎02-16-2006
Message 2 of 5 (479 Views)

Re: iLogic to Delete Sketched Symbol from the IDW

11-05-2012 12:13 PM 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.

Mentor
tuliobarata
Posts: 164
Registered: ‎11-30-2007
Message 3 of 5 (470 Views)

Re: iLogic to Delete Sketched Symbol from the IDW

11-05-2012 03:23 PM 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
Mentor
tuliobarata
Posts: 164
Registered: ‎11-30-2007
Message 4 of 5 (453 Views)

Re: iLogic to Delete Sketched Symbol from the IDW

11-06-2012 11:40 AM 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
Active Member
israel.parker
Posts: 8
Registered: ‎10-02-2013
Message 5 of 5 (233 Views)

Re: iLogic to Delete Sketched Symbol from the IDW

10-09-2013 05:01 PM in reply to: tuliobarata

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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube