Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5777

Wrap (2D) Text via Python/Rhinocommon

$
0
0

@romio82 wrote:

Hello Everybody,

is there any way to change (2D) text wrapping and the associated "textbox width" by means of Python or Rhinocommon? Especially with the new rich text features in WIP it would be amazing to be able to handle this via script! :innocent:

While we're at it:
If I do my wrapping "manually" meanwhile, does anyone have a better idea than:

  • Adding all words separately as text to the object table
  • Measuring widths by wrapping bounding boxes around the words
  • Adding \n to the sentence before it overshoots the required length
  • Deleting all single words from the object table
  • Adding the wrapped sentence as text to the object table

Seems possible, but not very elegant :sweat:

Thanks in advance!

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5777

Trending Articles