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!
    🚨 Skimp | 25% Off until March 30 Buy Now

    [Ruby API] Bug Mac - Sketchup.get_resource_path

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 2 Posters 258 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
      tomasz
      last edited by

      Sketchup.get_resource_path "Materials.strings"
      

      returns an empty string on Mac in SU8. Same applies to "Styles.strings" etc.

      Sketchup.get_resource_path '' returns:
      '/Library/Application Support/Google SketchUp 8/SketchUp/Resources/en-US'

      The file is located in 'Sketchup.app/Contents/Resources/English.lproj/Materials.strings'

      I haven't checked in SU2013.

      Author of Thea Render for SketchUp

      1 Reply Last reply Reply Quote 0
      • D Offline
        driven
        last edited by

        (Sketchup.get_resource_path '' ) << '/Materials.strings'
        

        => /Applications/SketchUp 2013/SketchUp.app/Contents/Resources/Content/Resources/en-US/Materials.strings

        works in v2013 on my mac.

        john

        learn from the mistakes of others, you may not live long enough to make them all yourself...

        1 Reply Last reply Reply Quote 0
        • T Offline
          tomasz
          last edited by

          Sketchup.get_resource_path "Materials.strings"
          

          doesn't work in SU2013.

          Thanks for the workaround, although it works only for SU2013.

          Author of Thea Render for SketchUp

          1 Reply Last reply Reply Quote 0
          • D Offline
            driven
            last edited by

            SU v8 and v7 on my mac

            edit, it returns a path to nowhere... but I knew I had it somewhere...

            matPath = (ENV[ "IG_ROOT"]).dup << "/English.lproj/Materials.strings"
            

            works on v8 and v2013 at least

            john

            learn from the mistakes of others, you may not live long enough to make them all yourself...

            1 Reply Last reply Reply Quote 0

            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 Login
            • 1 / 1
            • First post
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement