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: 

Add note

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
Giuseppe_Origine9S5JK
272 Views, 5 Replies

Add note

Hi.

I need to add a simple text note on my drawings using iLogic. For example "Paint" (with the possibility to box it).

I have no experience with iLogic, so If anyone can post a rule I can modify it would be great!

5 REPLIES 5
Message 2 of 6

Is this what you are looking for?

Dim doc As DrawingDocument = ThisDoc.Document
Dim sheet As Sheet = doc.ActiveSheet

Dim insertPoint = ThisApplication.TransientGeometry.CreatePoint2d(1, 1)
Dim note = sheet.DrawingNotes.GeneralNotes.AddFitted(insertPoint, "Painted")

note.ShowTextBorder = True

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Message 3 of 6

That is brilliant!

How do I choose text size and font?

Message 4 of 6

That is a bit more difficult. The easiest way is to create a note and run the following rule.

Dim note As GeneralNote = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingNoteFilter, "Select note")
logger.Info(note.FormattedText)

It writes the formatted text to the iLogic log. Then you can use that in the first rule as the text.

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Message 5 of 6

I thought it was easier, hence why I said I just need "painted". I acually need longer rentences to appear in a certain way, for example:


FABRICATION NOTES
FABRICATION WORKMANSHIP SHALL BE TO AS/NZS 1554.6 OR GREATER.
SHARP EDGES AND BURRS TO BE REMOVED.
DXF PROVIDED FOR PROFILE CUTTING. DRAWING SHALL BE USED FOR CRITICAL MEASUREMENTS.
MACHINING OPERATIONS TO BE COMPLETED AFTER FABRICATION AND WELD EXAMINATION.

Is there a guide I can consult with all the programming language options?

Message 6 of 6

Hi @Giuseppe_Origine9S5JK 

I would suggested to use formatted text sparingly unless you need to weave in parameter texts through the paragraphs. It is much easier to set a style in the style library and just call up the use of the style by code. 

This way you can adjust this globally if needed. Of course this mighten work for custo.ixation such as bold etc bit at least it gets you partially there. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan

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

Post to forums  

Autodesk Design & Make Report