• Login
sketchucation logo sketchucation
  • Login
🔌 Quick Selection | Try Didier Bur's reworked classic extension that supercharges selections in SketchUp Download

Units in the input value through the VCB

Scheduled Pinned Locked Moved Developers' Forum
3 Posts 2 Posters 282 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    dacastror
    last edited by 24 Jul 2014, 19:29

    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)

    1 Reply Last reply Reply Quote 0
    • D Offline
      Dan Rathbun
      last edited by 24 Jul 2014, 20:39

      The API adds a to_l method to the standard String class.

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • D Offline
        dacastror
        last edited by 24 Jul 2014, 21:47

        Dan thanks for replying, I found a recommendation yours here

        http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=55722%26amp;p=505915%26amp;hilit=units+vcb#p505915

        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.degrees

        I do not know if there is a better method

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          1/3
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement