run_ruby
Execute arbitrary Ruby code in SketchUp to access the Ruby API for advanced modeling when standard tools are insufficient.
Instructions
Run arbitrary Ruby code in SketchUp (Ruby API). Use it when the other tools are not enough. Useful objects: Sketchup.active_model, model.entities, model.selection. Internal units are inches: use 1000.mm, x.to_mm. The whole snippet is one Undo step. Returns the last value (inspect) and the puts output. Rules: do NOT call start_operation/commit_operation (the bridge already wraps the code in one Undo step); find entities with Sketchup.active_model.find_entity_by_id(id); check face.normal before pushpull; vertex coordinates inside a group are local (multiply by the parent group transformation); end with a value or puts; never call exit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |