iLogic Text Box in Sketch

iLogic Text Box in Sketch

mk92
Collaborator Collaborator
2,239 Views
4 Replies
Message 1 of 5

iLogic Text Box in Sketch

mk92
Collaborator
Collaborator

Hello,

 

i need to create a textbox in a sketch at specific coordinates. Is this possible?

 

Regards,

Marco

0 Likes
Accepted solutions (2)
2,240 Views
4 Replies
Replies (4)
Message 2 of 5

rossano_praderi
Collaborator
Collaborator
Accepted solution

Hi Marco,

this sample add a text within a sketch.

 

https://forums.autodesk.com/t5/inventor-customization/embossed-text-with-ilogic/m-p/5511400/highligh...

 

Bregs

Rossano Praderi



--------------------------------------
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!
---------------
Message 3 of 5

mk92
Collaborator
Collaborator

Works fine, thank you! But i have some problems to change the Font Size.

 

I tried:

 

 Dim oTextBoxes As TextBoxes
 Dim oStyle As TextStyle
 
 
            For Each oTextBox In oTextBoxes
                oStyle = oTextBox.Style
                oStyle.Font = "Chiller"
                oStyle.FontSize = 10
            Next

 

But it says:

 

Object reference not set to an object instance.

0 Likes
Message 4 of 5

RodrigoEiras
Advocate
Advocate
Accepted solution

 

Hi mk92,

 

I think you have to look for the property FormattedText if you want to override the text size for an specific TextBox.

 

I believe you may find this post helpful:

 

 

https://forums.autodesk.com/t5/inventor-customization/change-font-size-with-vb-net/m-p/5655174/highl...

 

I hope it helps!

 

 

Message 5 of 5

mk92
Collaborator
Collaborator

Got it! Thank you!

0 Likes