Units in the input value through the VCB
-
hi all, I want to ask If at the SketchUp API
Is there a way to interpret a length inserted through the VCB,
as when the translation tool is used?
for example: when the user is working on fractional inch format
and enter something like 10 1/2 or you're working in centimeters and enter something like 15.3 cm
my question is:
Does the API has some input interpreter for a length or should be built?
Thanks in advance for your help
(google translator) -
The API adds a
to_lmethod to the standardStringclass. -
Dan thanks for replying, I found a recommendation yours here
which led me to the article by thomthom
http://www.thomthom.net/thoughts/2012/08/dealing-with-units-in-sketchup/
I only have problem for receiving angles values with comma as decimal separator, then I am forced to use the following
text_input.sub!(',','.') text_input.to_f.degreesI do not know if there is a better method
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginAdvertisement