DimensionRadial
An annotation that measures the radius or diameter of a circle or arc.
Radial dimensions are used to label curved geometry with its radius measurement. They display the letter “R” followed by the radius value and draw a leader line from the text to the curve. You typically create them with Operation.createDimensionRadial inside an operation.
Because DimensionRadial is a snapshot, it reflects the dimension’s state at the moment you fetched it. If the user moves or modifies the dimension, call refresh to get an updated copy.
Example
Section titled “Example”let model = await SketchUpApi.getActiveModel();
// Create a circle and add a radial dimension.await model.performOperation(op => { const circle = op.createCircle( model, [0, 0, 0], // center [0, 0, 1], // normal 50, 24 // radius, segments ); op.createDimensionRadial( model, circle.curve, [75, 0, 0] // leader break point );}, 'Annotate circle with radial dimension');
// Query back all radial dimensions to see the text.let dims = await model.entities.get({ filterBy: { types: ['DimensionRadial'] }});console.log(dims[0].text);// => "R50.0"SDK 2.23.0 Protocol 1.20.0
Extends
Section titled “Extends”BaseDrawingElement
Properties
Section titled “Properties”arcCurve
Section titled “arcCurve”
readonlyarcCurve:ArcCurveRef|undefined
A reference to the arc curve being measured. Call
model.findEntity(dimension.arcCurve) to fetch the full
ArcCurve object. May be undefined if the curve has been deleted.
arrowType
Section titled “arrowType”
readonlyarrowType:DimensionArrowType
The style of arrow displayed at the end of the leader line. Controls whether the dimension shows a closed arrow, open arrow, dot, slash, or no arrow at all.
attributes
Section titled “attributes”
readonlyattributes:Attributes
The attribute dictionaries attached to this element. Attributes store custom key-value metadata that extensions can read and write.
Inherited from
Section titled “Inherited from”BaseDrawingElement.attributes
castsShadows
Section titled “castsShadows”
readonlycastsShadows:boolean
Whether this element casts shadows onto other geometry.
Inherited from
Section titled “Inherited from”BaseDrawingElement.castsShadows
hasAlignedText
Section titled “hasAlignedText”
readonlyhasAlignedText:boolean
Whether the dimension text is aligned parallel to the leader line. When
true, the text rotates to match the leader angle; when false, it stays
horizontal (screen-aligned).
hidden
Section titled “hidden”
readonlyhidden:boolean
Whether this element is hidden. Hidden elements don’t appear in the viewport unless the user enables “View > Hidden Geometry.”
Inherited from
Section titled “Inherited from”BaseDrawingElement.hidden
readonlyid:number
The persistent ID that uniquely identifies this dimension.
leaderPoints
Section titled “leaderPoints”
readonlyleaderPoints:Point3d[]
The points that define the dimension’s leader line, starting with the break point (where the leader meets the text) and ending at the curve. Use leaderBreakPoint to access the first point directly.
materialRef
Section titled “materialRef”
readonlymaterialRef:MaterialRef|undefined
A reference to the material applied to this element, if any. Call
getMaterial() to fetch the full Material object with color and texture data.
Inherited from
Section titled “Inherited from”BaseDrawingElement.materialRef
readonlyplane:Plane
The plane in which this dimension lies. The plane’s origin, x-axis, and y-axis define the 2D coordinate space for the dimension’s leader and text.
receivesShadows
Section titled “receivesShadows”
readonlyreceivesShadows:boolean
Whether this element receives shadows cast by other geometry.
Inherited from
Section titled “Inherited from”BaseDrawingElement.receivesShadows
tagRef
Section titled “tagRef”
readonlytagRef:TagRef|undefined
A reference to the tag (formerly “layer”) assigned to this element. Call
getTag() to fetch the full Tag object.
Inherited from
Section titled “Inherited from”BaseDrawingElement.tagRef
readonlytext:string
The displayed measurement text, including the “R” prefix and radius value.
For example, a 50-unit circle shows as "R50.0". This reflects the model’s
current unit settings and precision.
readonlytype:DimensionRadial=EntityType.DimensionRadial
Accessors
Section titled “Accessors”leaderBreakPoint
Section titled “leaderBreakPoint”Get Signature
Section titled “Get Signature”get leaderBreakPoint():
Point3d
The point where the leader line breaks away from the text box. This is the first point in leaderPoints — a convenience accessor for the most commonly referenced point on the leader.
Returns
Section titled “Returns”sketchupId
Section titled “sketchupId”Get Signature
Section titled “Get Signature”get sketchupId():
SketchupId
JS API identifier for this dimension. Pass it to API methods that accept a sketchupId.
Returns
Section titled “Returns”Overrides
Section titled “Overrides”BaseDrawingElement.sketchupId
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”getBounds()
Section titled “getBounds()”getBounds():
Promise<BoundingBox>
Fetches the axis-aligned bounding box for this element from SketchUp.
Returns
Section titled “Returns”Promise<BoundingBox>
Example
Section titled “Example”let model = await SketchUpApi.getActiveModel();let all = await model.entities.get();let element = all[0];let box = await element.getBounds();console.log(box.min.x, box.min.y, box.min.z);console.log(box.max.x, box.max.y, box.max.z);SDK 2.30.0
Inherited from
Section titled “Inherited from”BaseDrawingElement.getBounds
getMaterial()
Section titled “getMaterial()”getMaterial():
Promise<Material|undefined>
Fetches the material applied to this element. Returns undefined if the
element uses the default material.
Returns
Section titled “Returns”Promise<Material | undefined>
Example
Section titled “Example”let model = await SketchUpApi.getActiveModel();let all = await model.entities.get();let element = all[0];let mat = await element.getMaterial();if (mat) { console.log(mat.name, mat.color.toHex());}SDK 2.30.0
Inherited from
Section titled “Inherited from”BaseDrawingElement.getMaterial
getTag()
Section titled “getTag()”getTag():
Promise<Tag|undefined>
Fetches the tag assigned to this element. Most elements have a tag — even
those on the default “Untagged” tag. Returns undefined only if the tag
reference is missing.
Returns
Section titled “Returns”Promise<Tag | undefined>
Example
Section titled “Example”let model = await SketchUpApi.getActiveModel();let all = await model.entities.get();let element = all[0];let tag = await element.getTag();if (tag) { console.log(tag.name);}SDK 2.30.0
Inherited from
Section titled “Inherited from”BaseDrawingElement.getTag
refresh()
Section titled “refresh()”refresh():
Promise<DimensionRadial>
Re-fetches this dimension from SketchUp to get its current state. Because
DimensionRadial is a snapshot, it can become stale if the user moves the
dimension text or if the measured curve changes. Call refresh() to get an
up-to-date copy.
Returns
Section titled “Returns”Promise<DimensionRadial>
A new DimensionRadial reflecting the current model state. Throws if the dimension has been deleted.
Example
Section titled “Example”let model = await SketchUpApi.getActiveModel();let dims = await model.entities.get({ filterBy: { types: ['DimensionRadial'] },});// Later, after the user makes changes...let fresh = await dims[0].refresh();console.log(fresh.text);toString()
Section titled “toString()”toString():
string
Returns a string representation of an object.
Returns
Section titled “Returns”string
Deprecated
Section titled “Deprecated”materialId
Section titled “materialId”
readonlymaterialId:number|undefined
Inherited from
Section titled “Inherited from”BaseDrawingElement.materialId
readonlytagId:number|undefined
Inherited from
Section titled “Inherited from”BaseDrawingElement.tagId
bounds
Section titled “bounds”Get Signature
Section titled “Get Signature”get bounds():
Promise<BoundingBox>
Returns
Section titled “Returns”Promise<BoundingBox>
Inherited from
Section titled “Inherited from”BaseDrawingElement.bounds
Get Signature
Section titled “Get Signature”get tag():
Promise<Readonly<Tag> |undefined>
Returns
Section titled “Returns”Promise<Readonly<Tag> | undefined>
Inherited from
Section titled “Inherited from”BaseDrawingElement.tag