ConstructionPointRef
A lightweight placeholder for a ConstructionPoint that hasn’t been fully loaded yet.
When you create construction points inside a
SketchupOperation, the API returns ConstructionPointRef
objects immediately, before SketchUp has finished processing the
geometry. You can often pass these refs to other operation
methods, but if you need the full ConstructionPoint
instance, you can request it with entityForRef().
Think of a ref as a “claim ticket” — it guarantees a
construction point will exist after the operation commits, but
it doesn’t carry the point’s properties (position, etc.) yet.
A ref is only valid inside the performOperation callback that
created it — do not return it or use it after the operation
commits.
Example
Section titled “Example”let model = await SketchUpApi.getActiveModel();let { Point3d } = SketchUpApi;
await model.performOperation(async op => { const ptRef = op.createConstructionPoint( model, new Point3d(50, 75, 0) ); const pt = await op.entityForRef(ptRef); console.log(pt.position.x, pt.position.y); // => 50 75}, 'Create a construction point');SDK 2.7.0 Protocol 1.5.0
Properties
Section titled “Properties”sketchupId
Section titled “sketchupId”
readonlysketchupId:SketchupId
readonlytype:ConstructionPoint=EntityType.ConstructionPoint
Accessors
Section titled “Accessors”typeName
Section titled “typeName”Get Signature
Section titled “Get Signature”get typeName():
string
Returns a named variant of the type field.
SDK 2.35.0
Returns
Section titled “Returns”string
Methods
Section titled “Methods”toString()
Section titled “toString()”toString():
string
Returns
Section titled “Returns”string