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!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Is it possible...

    Scheduled Pinned Locked Moved Developers' Forum
    7 Posts 4 Posters 835 Views 4 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.
    • W Offline
      Whaat
      last edited by

      1. Is it possible to enter 'component edit mode' with Ruby?
      2. Is it possible to prompt the user to browse for a file folder (not a file)?

      If not, consider these requests for the next service release of SU.

      Thanks.

      SketchUp Plugins for Professionals

      1 Reply Last reply Reply Quote 0
      • R Offline
        RickW
        last edited by

        No on both counts. I requested #1 back in June and again in October, so it's on the radar in Boulder. I like #2 as well. I suppose it could be handled in a webDialog, but it would be so much better as a native tool. I have officially requested #2 now...

        RickW
        [www.smustard.com](http://www.smustard.com)

        1 Reply Last reply Reply Quote 0
        • W Offline
          Whaat
          last edited by

          Thanks Rick! (although not the response I was hoping for...)

          SketchUp Plugins for Professionals

          1 Reply Last reply Reply Quote 0
          • W Offline
            Whaat
            last edited by

            Good info, TIG. Thanks!

            Here's another one:
            Is it possible to use the arrow keys to lock axis inference in a user-defined tool?

            SketchUp Plugins for Professionals

            1 Reply Last reply Reply Quote 0
            • fredo6F Offline
              fredo6
              last edited by

              @whaat said:

              Is it possible to use the arrow keys to lock axis inference in a user-defined tool?

              I am afraid you have to code it as part of your tool, which is not too complex in general.
              Sorry for bad news, but maybe someone else has a trick.

              Fredo

              1 Reply Last reply Reply Quote 0
              • W Offline
                Whaat
                last edited by

                @unknownuser said:

                [I am afraid you have to code it as part of your tool, which is not too complex in general.
                Sorry for bad news, but maybe someone else has a trick.

                I'm not quite sure how to do this...I guess I'll start experimenting.

                SketchUp Plugins for Professionals

                1 Reply Last reply Reply Quote 0
                • TIGT Offline
                  TIG Moderator
                  last edited by

                  @whaat said:

                  1. Is it possible to enter 'component edit mode' with Ruby?
                  2. Is it possible to prompt the user to browse for a file folder (not a file)?
                    If not, consider these requests for the next service release of SU.
                    Thanks.
                  1. I used a trick to edit groups [PC only] - components could be done similarly...
                  require 'sketchup'
                  require 'win32ole.so'
                  def edit_group
                    ### an example of access SUp tools not otherwise available...
                    ### make shortcut here if NOT set already = ctrl+alt+shift+G
                    ### check that you have one group selected and if so do this...
                    WIN32OLE.new("WScript.Shell").SendKeys("+^%{g}")
                  end#def
                  ### run it from within other tools
                  ### the menu here for test only...
                  if(not file_loaded?("edit_group.rb"))
                    UI.menu("Plugins").add_item("Edit Group"){edit_group}
                  end#if
                  file_loaded("edit_group.rb")
                  ###
                  
                  1. This is how I find a directory - you do need to pick a file in it though...
                  require 'sketchup.rb'
                  #-----------------------------------------------------------------------------
                  def materialimporter
                     model= Sketchup.active_model
                     materials= model.materials
                     model.start_operation ("Import Materials") ###undo - see commit at end
                     pwd= Dir.getwd.split("/").join("\\")+"\\" ### fix for SU
                     drctry= UI.openpanel "To Pick this Directory; Pick Any Image File + OK...", pwd , "*.???"
                     return nil if not drctry
                     drctry= File.dirname(drctry)
                     return nil if not drctry
                     cwd= Dir.chdir(drctry)
                     images= Dir["*.{jpg,png,tif,bmp,gif,tga,epx}"]### for all supported image file types
                     for image in images
                        imgname= image.split(".")[0..-2].join(".") ### removes .jpg etc from end
                        mat= materials.add(imgname)
                        mat.texture= image
                     end#for image###
                     model.commit_operation ###undo all if needed
                  end#def###
                  
                  

                  .

                  TIG

                  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