SketchUp  Ruby API Reference 

Class Index

Method Index

Developers Guide

Examples

ConstructionPoint class

A construction point represents a point in the model that can be used to aid in other modeling operations. For example, you may put a construction point at the center of a circle to make it easier to locate that point for performing other operations.

The ConstructionPoint class contains one method to retrieve the position of a construction point.

Parent:Drawingelement

Methods: position

Example Code: constructionpointtests.rb

Instance Methods


position

The position method is used to retrieve the Point3d object position of the construction point.

Syntax

point = constructionpoint.position

Return Value

point - a Point3d object containing the position in 3 dimensional space

Example

point = Geom::Point3d.new 100,200,300
model = Sketchup.active_model
entities = model.active_entities
entities.add_cpoint point
cpoint = entities[0]
position = cpoint.position
if (position)
UI.messagebox position
else
UI.messagebox "Failure"
end