sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    [Ruby API] Bug Mac - Sketchup.get_resource_path

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 2 Posters 175 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](http://www.thearender.com/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](http://www.thearender.com/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
            • 1 / 1
            • First post
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement