|
SketchUp Ruby API Reference |
The Tools class contains methods to manipulate a collection of SketchUp tools.
Parent:
Methods: add_observer, active_tool_id, active_tool_name, model, pop_tool, push_tool, remove_observer
Example Code:
The add_observer method is used to add an observer to the current object.
status = object.add_observer observer
observer - an observer
status - true if successful, false if unsuccessful.
The activate_tool method is used to retrieve the active tool's id.
id = tools.active_tool_id
id - the active tool's id.
The active_tool_name method is used to retrieve the active tool's name.
name = tools.active_tool_name
name = the active tool's name.
The model method is used to get the model associated with this tools object.
model = tools.model
model - a Model object associated with this tool.
The pop_tool method is used to pop the last pushed tool on the tool stack.
tool = tools.pop_tool
tool - the last pushed Tool object.
The push_tool method is used to push a user-defined tool.
status = tools.push_tool tool
tool - a user-defined Tool object.
status - true if successful, false if unsuccessful.
The remove_observer method is used to remove an observer from the current object.
status = tools.remove_observer observer
observer - an observer
true if successful, false if unsuccessful.
|
SketchUp Ruby API Reference: Tools class |
© Google Inc. 2006 sketchup.google.com |