[script] Sketchup 7.1 all hiden action :lol:
-
it looks like it contains also the String resource which is something different than .send_action (which is a WM_COMMAND menu wrapper)
-
Yea, I'm confused. I thought the
send_action
only returned a boolean value... -
-
HEhehehe. Good one Thom.
Very interesting.
Chris
-
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"
enddef 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"
endRESULE:
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 wayI 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 -
@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.
-
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 -
Are they shipping with SU - or is it a plugin that added them?
-
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")
-
@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.
Advertisement