sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    New to Ruby / Sketchup

    Scheduled Pinned Locked Moved Developers' Forum
    2 Posts 2 Posters 283 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.
    • T Offline
      tsugua
      last edited by

      Hi There,

      I am having a problem encoding a URL in Sketchup's Ruby. I am trying to communicate with a web enabled device that accepts commands through simple url get. I can get the device talking with sketch up using simple commands but with some of the more complex commands the device is using non standard web characters and I am having trouble with that.

      For example I want to send to a url http://192.168.1.1/exe.cgi?cmd=f1a{#255,#255,#255}

      I have everything looking good in ASCII but when it passes to the url it stops at the first {

      I have tried some of the ruby encoding options but it doesn't seem like sketchup supports anything beyond simple string and integer commands.

      Any suggestions would be greatly appreciated.

      Thanks,

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        You must URL encode the data you put into URLs. Not all charactered are allowed.

        Thomas Thomassen β€” SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

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

        Advertisement