sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [script] Sketchup 7.1 all hiden action :lol:

    Scheduled Pinned Locked Moved Developers' Forum
    12 Posts 5 Posters 18.9k Views 5 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.
    • thomthomT Offline
      thomthom
      last edited by

      All of these don't look like actions though.
      105 Could not load file %s. %s.
      That sounds more like a string. Did you get a string returned by the method?

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

      1 Reply Last reply Reply Quote 0
      • tbdT Offline
        tbd
        last edited by

        it looks like it contains also the String resource which is something different than .send_action (which is a WM_COMMAND menu wrapper)

        SketchUp Ruby Consultant | Podium 1.x developer
        http://plugins.ro

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

          Yea, I'm confused. I thought the send_action only returned a boolean value...

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

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

            @gavvy said:

            20408 Zombies and Others: %1!d!

            ...

            
            Sketchup.send_action(20408)
            > true
            
            

            😲

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

            1 Reply Last reply Reply Quote 0
            • Chris FullmerC Offline
              Chris Fullmer
              last edited by

              HEhehehe. Good one Thom.

              Very interesting.

              Chris

              Lately you've been tan, suspicious for the winter.
              All my Plugins I've written

              1 Reply Last reply Reply Quote 0
              • G Offline
                gavvy
                last edited by

                hehe

                i just to use

                Sketchup.display_name_from_action to get these and i don't know why some actions do not work .
                is there some def in the "sketchup module"? or Can we redefined these unuse actions just as "60000~100000"
                but i don't know :"Sketchup" is a module or a class in the api of GoogleSketchup ? 😳

                these day i 'm rewroting Jim's Customtoolbar and i get some trobules

                RubyScript:

                module F
                require PipeAlongPath.rb
                def self.A
                eval "pipe_along_path"
                end

                def self.B
                	eval pipe_along_path
                end
                
                def self.C
                	send "pipe_along_path"
                end
                
                def self.D
                	cm
                end
                

                end

                def cm
                eval "pipe_along_path"
                end

                RESULE:
                F.A > undefined local variable or method `get_vertices' for F:Module
                F.A > no But other work well
                F.C> ok But other donsn't work
                F.B> ok BUT i don't know how to translate a string to a command
                F.D > ok ALL,and i don't want to use this way

                I am going to create a Module to contain each rubyscript so they won't interup with eachother
                is there anything wrong ?
                or is anyone can tell me the other way to run a command just to send the command name to the sketchup

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

                  @gavvy said:

                  Sketchup.display_name_from_action to get these and i don't know why some actions do not work .
                  is there some def in the "sketchup module"? or Can we redefined these unuse actions just as "60000~100000"
                  but i don't know :"Sketchup" is a module or a class in the api of GoogleSketchup ?

                  That does not sound like a good idea. Best not to redefine base classes and methods.

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

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    cjthompson
                    last edited by

                    I was browsing Object.constants and I found these.

                    just use them with Sketchup.send_action as constants, not strings.

                    CMD_ARC
                    CMD_CAMERA_UNDO
                    CMD_CIRCLE
                    CMD_COPY
                    CMD_CUT
                    CMD_DELETE
                    CMD_DIMENSION
                    CMD_DISPLAY_FOV
                    CMD_DOLLY
                    CMD_DRAWCUTS
                    CMD_DRAWOUTLINES
                    CMD_ERASE
                    CMD_EXTRUDE
                    CMD_FREEHAND
                    CMD_HIDDENLINE
                    CMD_LINE
                    CMD_MAKE_COMPONENT
                    CMD_MEASURE
                    CMD_MOVE
                    CMD_NEW
                    CMD_OFFSET
                    CMD_OPEN
                    CMD_ORBIT
                    CMD_PAGE_DELETE
                    CMD_PAGE_NEW
                    CMD_PAGE_NEXT
                    CMD_PAGE_PREVIOUS
                    CMD_PAGE_UPDATE
                    CMD_PAINT
                    CMD_PAN
                    CMD_PASTE
                    CMD_POLYGON
                    CMD_POSITION_CAMERA
                    CMD_PRINT
                    CMD_PROTRACTOR
                    CMD_PUSHPULL
                    CMD_RECTANGLE
                    CMD_REDO
                    CMD_ROTATE
                    CMD_RUBY_CONSOLE
                    CMD_SAVE
                    CMD_SCALE
                    CMD_SECTION
                    CMD_SELECT
                    CMD_SELECTION_ZOOM_EXT
                    CMD_SHADED
                    CMD_SHOWGUIDES
                    CMD_SHOWHIDDEN
                    CMD_SKETCHAXES
                    CMD_SKETCHCS
                    CMD_TEXT
                    CMD_TEXTURED
                    CMD_TRANSPARENT
                    CMD_UNDO
                    CMD_VIEW_BACK
                    CMD_VIEW_BOTTOM
                    CMD_VIEW_FRONT
                    CMD_VIEW_ISO
                    CMD_VIEW_LEFT
                    CMD_VIEW_PERSPECTIVE
                    CMD_VIEW_RIGHT
                    CMD_VIEW_TOP
                    CMD_WALK
                    CMD_WIREFRAME
                    CMD_ZOOM
                    CMD_ZOOM_EXTENTS
                    CMD_ZOOM_WINDOW

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

                      Are they shipping with SU - or is it a plugin that added them?

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

                      1 Reply Last reply Reply Quote 0
                      • C Offline
                        cjthompson
                        last edited by

                        I just emptied out my plugins folder and they were still there. Is it even possible for a plugin to add actions to Sketchup?

                        BTW, this is the command I used to find them:
                        Object.constants.grep(/CMD./).sort.join("\n")

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

                          @cjthompson said:

                          Is it even possible for a plugin to add actions to Sketchup?

                          No - but these where just constants. I was just wondering if a plugin had defined them to simplify things.

                          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