iLogic script to turn on/off text on the drawings

iLogic script to turn on/off text on the drawings

Anonymous
Not applicable
749 Views
3 Replies
Message 1 of 4

iLogic script to turn on/off text on the drawings

Anonymous
Not applicable

Hello !!!

 

Does anyone know how to turn on/off text on the drawing? Please help! I`m working on the drawing template and would like to have a form that will allow engineer by checking check boxes to turn on/off certain text on the drawing.

 

Thanks

0 Likes
750 Views
3 Replies
Replies (3)
Message 2 of 4

MegaJerk
Collaborator
Collaborator

I would suggest changing your notes into Draft Views, naming them, and then using the code below to manipulate the states from suppressed to non-suppressed.

Because the General Notes (which is the object type of your basic Text annotation) are only called by Item number, rather than text, there would be a lot more code involved and it would also be a lot messier.

Once you have your draft views, and you know that they are going to be on the same page (this includes page number - AKA “:#” after the main drawing name if it’s included in the page count), try this: 

 

 

ThisDrawing.Sheet("Sheet Drawing Name").View("Note Name Here").View.Suppressed = True

 

 

I hope that helps. 



If my solution worked or helped you out, please don't forget to hit the kudos button 🙂
iLogicCode Injector: goo.gl/uTT1IB

GitHub
0 Likes
Message 3 of 4

Anonymous
Not applicable

Thank you.

I thought there is a way to turn on/off the text. Not just the view names.

I guess other way would e to create a sketch with the text on the drawing and control it thru iLogic script.

Do you know how to supress sketches on the dwg file?

0 Likes
Message 4 of 4

MegaJerk
Collaborator
Collaborator

Yeah. Just make sure you use draft view sketching in the above example, as that way you can name it to something in the drawing browser. 
 

I know that (failure to make that distinction)  has thrown some people off in the past. 



If my solution worked or helped you out, please don't forget to hit the kudos button 🙂
iLogicCode Injector: goo.gl/uTT1IB

GitHub
0 Likes