Vary sketch dimension based on text length

Vary sketch dimension based on text length

captnshacky
Explorer Explorer
245 Views
2 Replies
Message 1 of 3

Vary sketch dimension based on text length

captnshacky
Explorer
Explorer

 

 

Is there a way to change a dimension by referencing text length using a parameter?

For example, If I have a rectangle that's 50x50mm and I create text inside said rectangle that is 50x100mm, can I set a parameter and calculation to automatically increase the rectangle size beyond or to the text size of 100mm?

                     Thanks for any help

0 Likes
Accepted solutions (1)
246 Views
2 Replies
Replies (2)
Message 2 of 3

jhackney1972
Consultant
Consultant
Accepted solution

Attached is an example of what you are talking about.  I chose my own dimensions but the theory is what you are after.  The Length of the box around the text is 20mm longer than the text maximum size and is centered on the text.  The Width is set to the text length divided by two.  These values are for illustration and can be edited to suit.  Please note that the Text_Lgth parameter is a reference dimension and cannot be used outside the sketch it was created in. 

 

Edit: I forgot to label the Text_Size parameter.  New screen capture and new model is attached.

Text Box.jpg

 

John Hackney, Retired
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

Message 3 of 3

captnshacky
Explorer
Explorer

 

Thank you

0 Likes