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

Is there a built in API method to format a length value into a desired unit system

$
0
0

@Jun_Wang wrote:

for example if file unitsystem is feet, it will format 26 into 2’ 2", and 26.125 into 2’ 2-1/8" and also take into consideration the accuracy in the file setting, and if the unitsystem is m, it will format 26.125 into 26 m instead if the accuracy is higher.

I couldn’t find anything in rhinoscript and inside rhinocommon, the Rhino.LengthValue class seems promising but after some test doesn’t seem to do what I’m looking for.

I’m looking for a built in function like this to help me write a simple script to create a text dot on a point and show it’s measured z height in a desired unit system and accuracy above a user input base plane. I think it’s not impossible to manually code that formatting, but I’m wondering if Rhino has something useful already.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5830