Change Log
2.37.0
Section titled “2.37.0”Fill in feature gaps of Vector3d and Point3d, as well as improving ergonomics.
Ergonomic Point3d and Vector3d Inputs
Anywhere the SDK accepts a Point3Like or Vector3Like — points, vectors, transformations, planes, rays — you can now also pass a {x, y, z?} object or an [x, y] tuple, with z defaulting to 0. Previously only a full [x, y, z] tuple or a Point3d/Vector3d instance was accepted.
New create() Factory Methods
Added consistent create() factories across the geometry classes:
New Ray3d Class
Added Ray3d, representing an immutable ray (or line) in 3D space, to support the new line-intersection methods on Point3d below.
Ray3d.between()andRay3d.create()— construct from two points, or anything shaped like a rayRay3d.projectPoint()— projects a point onto the ray
New Point3d Methods
with()— returns a copy with selected x/y/z values replacedoffset()— moves a point along a vector, by an optional distancedistanceToLine(),isOnLine(),projectToLine()— distance to, containment on, and projection onto a linedistanceToPlane(),signedDistanceToPlane(),isOnPlane(),projectToPlane()— distance to, containment on, and projection onto a plane
New Vector3d Methods
with()— returns a copy with selected x/y/z values replacedfromLinearCombination()— combines two vectors using weighted coefficientsisSameDirectionAs()— true if two vectors point the same way (unlikeisParallel, doesn’t match anti-parallel vectors)isUnitVector()— true if the vector’s length is (approximately) 1
New Plane Methods
distanceToPoint()(replacesdistance())signedDistanceToPoint()— positive if the point is “above” the plane, negative otherwiseprojectPoint()— closest point on the plane
Renamed Methods
Every rename below is backward compatible: the previous name remains available as a deprecated alias and will continue to work until the next major version. Deprecated aliases log a one-time deprecation warning to the console.
Vector3d.parallel()→isParallel()Vector3d.fromVector3Like()/fromVector2Like()→Vector3d.create()Point3d.fromPoint3Like()/fromPoint2Like()→Point3d.create()Plane.fromPlaneLike()→Plane.create()Plane.distance()→Plane.distanceToPoint()
Note: toString() on Point3d, Vector3d, and Plane now omits brackets around the coordinates — e.g. Point3d(1,2,3) instead of Point3d([1,2,3]).
Migration Example:
// Old way (deprecated)let v = Vector3d.fromVector3Like([1, 2, 3]);let onPlane = plane.distance(point) < 0.001;
// New way (SDK 2.37.0)let v = Vector3d.create([1, 2, 3]);// or with the relaxed input shapes:let v2 = Vector3d.create({ x: 1, y: 2 });let onPlane = plane.distanceToPoint(point) < 0.001;2.36.7
Section titled “2.36.7”Updated third party libraries in ts code
2.36.6
Section titled “2.36.6”Bug Fixes
- Ensure examples can be pasted into the console and do not contain deprecated calls.
- Remove accidental deprecation warning logged when calling
model.getActiveSectionPlanes();
2.36.5
Section titled “2.36.5”Bug Fixes
- Fix an issue where the client was sending invalid dataURLs to SketchUp when loading certain resources via http.
2.36.4
Section titled “2.36.4”Bug Fixes
- Fixed a discrepancy in validation of the “up” vector between Camera.withOrientation and Ruby Camera.set=.
2.36.0
Section titled “2.36.0”Operation Queuing Support
Added support for queuing concurrent operation requests instead of immediately failing with an error. This is useful when handling rapid asynchronous requests from UI interactions or external systems.
Global Configuration:
ConnectOptions.whenOperationInProgress- Set the default behavior for all operations at connection time
Per-Operation Configuration:
OperationOptions.whenOperationInProgress- Override the global behavior for individual operationsOperationInProgressResolution- Type defining available resolution strategies
Error Handling:
TimeoutError- New error class thrown when a queued operation exceeds its timeout
Migration Example:
// Enable operation queuing globallyawait SketchUpApi.connect({ whenOperationInProgress: 'queue'});
// Or configure per-operationconst model = await SketchUpApi.getActiveModel();await model.performOperation( (op) => op.modelSetAttribute('test', 'key', 'value'), 'My Operation', { whenOperationInProgress: 'queue' });
// Or with a timeoutawait model.performOperation( (op) => op.modelSetAttribute('test', 'key', 'value'), 'My Operation', { whenOperationInProgress: { queueUpTo: { millis: 5000 } } });Bug Fixes
Fixed an issue where stale object references could still communicate with SketchUp after a call to SketchUpApi.disconnect().
This was problematic because the model ID may change between disconnect/reconnect and global settings may not apply correctly.
2.35.4
Section titled “2.35.4”Modal Dialog Buttons You Label Yourself:
ModalInputCustomAction— pass an array of these as a modal’sactionswhere the four shorthand sets ('ok','okcancel','yesno','yesnocancel') cannot say what the buttons actually do.
Each action becomes a button, in the order you list them, and the action on the response is the id of whichever one the user clicked. Dismissing the dialog still answers 'cancel'.
const answer = await SketchUpApi.ui.getModalInput({ title: 'Network Error', message: 'We could not reach the server.', actions: [ { id: 'retry', label: 'Retry' }, { id: 'cancel', label: 'Cancel', style: 'secondary' }, ],});
if (answer.action === 'retry') { console.log('The user wants another try');}The shorthand sets are unchanged, so existing calls to getModalInput() need no edits.
2.35.0
Section titled “2.35.0”API Naming Consistency Improvements
Removed the Sketchup prefix from various classes and types to improve consistency and align the SDK naming conventions. The old names remain available as deprecated aliases and will continue to work until the next major version. Deprecated aliases log a one-time deprecation warning to the console.
Renamed Classes and Types:
SketchupCamera→CameraDataSketchupEntity→EntityType(also exposed asSketchUpApi.EntityType)SketchupDrawingElementProperties→DrawingElementPropertiesUpdateSketchupEdgeProperties→EdgePropertiesUpdateSketchupComponentScaling→ComponentScalingSketchupSnapToEnum→ComponentSnapToSketchupComponentBehavior→ComponentBehavior
toString Methods
All publicly exposed classes now include a consistent toString() method that returns minimal but useful information for debugging and logging. This includes entity classes, references, and key types throughout the API.
Geometric Array Methods
Renamed Ruby-inspired to_a methods to the more idiomatic JavaScript toArray() across geometric classes for improved consistency with JavaScript naming conventions.
Camera API Improvements
Enhanced the Camera API for better immutability and consistency:
- Camera can now be constructed from another
Camerainstance or from aCameraDatainterface - Methods that previously accepted
SketchupCameranow acceptCameraDataorCamera - Mutable Camera methods have been deprecated in favor of immutable alternatives
- Scene.getCamera() now returns a
Camerainstance instead ofSketchupCamera
Unified find* Methods
Refactored lookup methods across multiple APIs to use a consistent find* naming convention that returns optional values instead of throwing errors.
Attributes.findValue()- Unified attribute lookup with optional defaultsAttributes.findDictionary()- Find dictionary by nameAttributes.dictionariesproperty (replacesallDictionaries)ComponentDefinition.findClassificationValue()andfindClassifications()TagManager.findTag()andfindTagFolder()TagFolder.findTag()andfindTagFolder()
Previous methods like getValue(), getValueWithPath(), getClassificationValue(), getTagByName(), and getTagFolderByName() remain as deprecated aliases.
Migration Example:
// Old way (deprecated - Sketchup prefix)const entityType: SketchupEntity = 'Face';const drawingProps: SketchupDrawingElementProperties = { hidden: true };const edgeProps: SketchupEdgeProperties = { hidden: true };
// New way (SDK 2.35.0)const entityType: EntityType = 'Face';const drawingProps: DrawingElementPropertiesUpdate = { hidden: true };const edgeProps: EdgePropertiesUpdate = { hidden: true };
// Geometric array methods// Old way (deprecated)const arr = point.to_a();
// New way (SDK 2.35.0)const arr = point.toArray();
// Camera constructionconst newCamera = new Camera(existingCamera);
// Unified find* methods// Old way (deprecated)const value = attributes.getValue('dict', 'key');const tag = await tagManager.getTagByName('MyTag');
// New way (SDK 2.35.0)const value = attributes.findValue('dict', 'key');const tag = await tagManager.findTag('MyTag');
// Model attribute lookup// Old way (deprecated)const color = model.attributes.getValue('colors', 'primary');const colorOrDefault = model.attributes.getValueOrDefault('colors', 'primary', 'black');
// New way (SDK 2.35.0)const color = model.attributes.findValue('colors', 'primary');const colorOrDefault = model.attributes.findValue('colors', 'primary', { defaultValue: 'black' });2.34.3
Section titled “2.34.3”Bug Fix
Fixed an inconsistency in the SketchupComponentScaling type where the disableRedBluePlane property did not follow the naming pattern of the other plane properties (disableGreenBlue and disableRedGreen).
The property has been renamed to disableRedBlue to match the existing pattern. The old property name remains available as a deprecated alias and will continue to work with a one-time deprecation warning logged to the console.
Migration:
// Old way (deprecated)operation.definitionSetNoScaleMask(defRef, { disableRedBluePlane: true});
// New way (SDK 2.34.3)operation.definitionSetNoScaleMask(defRef, { disableRedBlue: true});2.34.0
Section titled “2.34.0”Renamed EntitiesBuilder Methods:
EntitiesBuilder.faceCreate()→EntitiesBuilder.createFace()EntitiesBuilder.edgeCreate()→EntitiesBuilder.createEdge()
Every rename below is backwards compatible: the previous name remains available as a deprecated alias and will continue to work until the next major version. Deprecated aliases log a one-time deprecation warning to the console.
Migration Example:
// Old way (deprecated)builder.faceCreate(outerLoop);
// New way (SDK 2.34.0)builder.createFace(outerLoop);Bug Fix
Fixed a long-standing type inference bug where readonly arrays representing points or vectors (for example a readonly [number, number, number] tuple) could not be passed to EntitiesBuilder.createFace(), EntitiesBuilder.createEdge(), and other APIs that accept a Point3Like or Vector3Like.
2.33.0
Section titled “2.33.0”Enums that previously had to be reached through a nested namespace, or passed as raw numbers, are now exposed directly on SketchUpApi for pure JavaScript usage.
Edge Usage Type Exposed:
The edge usage type filter used when bulk-updating edge properties is now part of the public API.
- Added the
EdgeUsageTypeenum, available asSketchUpApi.EdgeUsageType. - Added
EdgeUsageTypeName, the named equivalent for convenience. Operation.entitiesSetEdgeProperties()andOperation.faceSetEdgeProperties()now accept either the enum or its name (for example'Shared').SketchupEdgeUsageTypeEnumis deprecated in favor ofEdgeUsageType, and remains available as an alias.
const model = await SketchUpApi.getActiveModel();
await model.performOperation(operation => { operation.entitiesSetEdgeProperties( model, SketchUpApi.EdgeUsageType.Shared, // or 'Shared' { hidden: true }, );}, 'Hide all shared edges');Rendering Option Enums Moved onto SketchUpApi:
SketchUpApi.RenderingOptions is deprecated. Each of its enums is now exposed directly on SketchUpApi, and accessing one through RenderingOptions logs a one-time deprecation warning to the console. The old path remains functional until the next major version.
SketchUpApi.RenderingOptions.EdgeType→SketchUpApi.EdgeTypeSketchUpApi.RenderingOptions.EdgeColorMode→SketchUpApi.EdgeColorModeSketchUpApi.RenderingOptions.EdgeDisplayMode→SketchUpApi.EdgeDisplayModeSketchUpApi.RenderingOptions.TransparencySort→SketchUpApi.TransparencySortSketchUpApi.RenderingOptions.RenderMode→SketchUpApi.RenderMode
Migration Example:
// Old way (deprecated)await model.updateRenderingOptions({ EdgeType: SketchUpApi.RenderingOptions.EdgeType.Sketchy,});
// New way (SDK 2.33.0)await model.updateRenderingOptions({ EdgeType: SketchUpApi.EdgeType.Sketchy,});2.32.0
Section titled “2.32.0”- Renamed
Extensionclass toUI. - Exposed .getModalInput function on the UI class.
2.31.0
Section titled “2.31.0”Changed the build artifact name and npm package name to sketchup-js-api.
2.30.3
Section titled “2.30.3”Continuing the get* naming convention adopted in 2.30.0, extending it to file and image export methods.
Every rename below is backwards compatible: the previous name remains available as a deprecated alias and will continue to work until the next major version. Deprecated aliases log a one-time deprecation warning to the console.
export* Methods Renamed with a get Prefix:
Model.getSkp()(wasexport)Material.getSkm()(wasexport)Texture.getImage()(wasexport)
Migration Example:
// Old way (deprecated)const skpDataUrl = await model.export();const skmDataUrl = await material.export();const textureDataUrl = await material.texture.export('png', { colorize: true });
// New way (SDK 2.30.3)const skpDataUrl = await model.getSkp();const skmDataUrl = await material.getSkm();const textureDataUrl = await material.texture.getImage('png', { colorize: true });2.30.1
Section titled “2.30.1”Added a renderOptions parameter to SketchupView.getScreenshot() for controlling additional rendering behavior such as shadows, annotations, watermarks, and axes in exported screenshots.
Note: renderOptions is not available when connected to the Ruby version of the JSA backend. Use Platform.supportsScreenshotRenderOptions to check for support.
2.30.0
Section titled “2.30.0”Aligning naming of classes and methods with their Ruby equivalent. Improving consistency of function names.
Every rename below is backwards compatible: the previous name remains available as a deprecated alias and will continue to work until the next major version. Deprecated aliases log a one-time deprecation warning to the console. See Naming and Versioning for the conventions being adopted.
Renamed Classes and Types:
Component→ComponentDefinitionComponentRef→ComponentDefinitionRefEntityBuilder→EntitiesBuilderEntitySelection→SelectionEntitySelectionMetadata→SelectionMetadataStreamHandle→ObserverHandle
stream* Methods Renamed to observe*:
Streaming methods have been renamed to observe* and now return an ObserverHandle.
Model.observeOptionsChanges()(wasstreamOptionsChanges)Model.observeSelectionMetadata()(wasstreamSelectionMetadata)Model.observeActivePath()(wasstreamActivePath)Model.observeRenderingOptions()(wasstreamRenderingOptions)SketchupTools.observeToolChanges()(wasstreamToolChanges)ComponentDefinition.observeInstanceChanges()(wasstreamInstanceChanges)
Async Accessors Renamed with a get Prefix:
Asynchronous accessors now consistently start with get.
Model.findEntity()(wasfindEntityById)Model.findEntities()(wasfindEntitiesById)Model.getBounds()(wasbounds)Model.getClassifications()(wasclassifications)Model.getMaterials()(wasmaterials)Model.getDefinitions()(wascomponents)Model.getCurrentMaterial()(wascurrentMaterial)Model.getNumberOfFaces()(wasnumberOfFaces)ComponentDefinition.getInstances()(wasinstances)Tag.getFolder()(wasfolder)getModel()on the streaming model (wasloadModel)
SketchupOperation Method Renaming:
Operation methods now follow the convention that creation methods start with create, removal methods start with remove, resource loading methods start with load, and component-definition methods are prefixed definition* (previously component*) and instance methods instance*. The most notable renames:
- Creation:
createFace,createFaceFromEdges,createEdge,createGroup,createInstance,createMaterial,createDefinition,createImage,createScene,createTag,createTagFolder,createSectionPlane,createSnap,createText,createArc,createCircle,createCurve,createNgon,createDimensionLinear,createDimensionRadial,createDuplicateStyle - Removal:
removeStyle,removeMaterial,removeDefinition,removeScene,removeTag,removeTagFromFolder,removeTagFolder - Purge:
purgeUnusedStyles,purgeUnusedMaterials,purgeUnusedDefinitions - Resource loading (async):
loadMaterial,loadDefinition - Component definitions:
definitionSetName,definitionSetDescription,definitionSetToFaceCamera,definitionSetToCutOpening,definitionSetNoScaleMask,definitionSetShadowsToFaceSun,definitionSetToSnapTo,definitionAddClassification,definitionRemoveClassification,definitionSetClassificationValue - Component instances:
instanceSetName,instanceSetLocked,instanceSetTransformation,instanceApplyTransformation,instanceSetGluedTo - Styles:
setSelectedStyle,updateSelectedStyle
Migration Example:
// Old way (deprecated)const definition: Component = await model.components().then((c) => c[0]);const materials = await model.materials();const handle = model.streamSelectionMetadata((meta) => console.log(meta));
operation.faceCreate(entities, points);operation.componentSetName(definition, 'Chair');
// New way (SDK 2.30.0)const definition: ComponentDefinition = await model .getDefinitions() .then((d) => d[0]);const materials = await model.getMaterials();const handle: ObserverHandle = model.observeSelectionMetadata((meta) => console.log(meta));
operation.createFace(entities, points);operation.definitionSetName(definition, 'Chair');2.29.0 (Ruby version 3.15.1)
Section titled “2.29.0 (Ruby version 3.15.1)”Implemented unified, type-safe entity filtering system that replaces type-specific query methods with a single, powerful Entities API.
The new entity filtering system provides compile-time type inference, better composability, and a more consistent API surface. All existing type-specific methods (.faces(), .groups(), .edges(), etc.) are deprecated but remain functional with backward compatibility.
New Unified Entity API:
- Entities class - Unified entity container with
.get()method - entities property - Access entities on SketchupModel
- entities property - Access entities on Component
- entities property - Access entities on Group
New Filter Types:
EntityFilter- Union type for all entity filtersEntityTypeFilter- Filter by entity type(s) using string literals or enumsEntityAttributeFilter- Filter by attribute dictionary valuesEntityTagFilter- Filter by tag assignmentEntityVisibilityFilter- Filter by visibility stateEntityAndFilter,EntityOrFilter,EntityNotFilter- Logical filter combinators
Type-Safe Queries:
EntityQuery<Filter>- Standard query interface with type inferenceEntityTypeForFilter<Filter, Default>- Utility type that infers return types from filters at compile-time
New Scene Methods:
- getScenes() - Get all scenes in the model
- getCurrentScene() - Get the currently active scene
- setCurrentScene() - Set the active scene
- getActiveSectionPlanes() - Get active section planes with type-safe filtering
Enhanced Methods with Filter Support:
- getAllConnected() - Now supports type-safe entity filtering
- getGluedInstances() - Now supports type-safe entity filtering
- getSelection() - Now accepts
EntityQuery<EntityFilter> - getSelectionMetadata() - Now accepts
EntityQuery<EntityFilter> - streamSelectionMetadata() - Now accepts
EntityQuery<EntityFilter>
Deprecated Methods:
The following type-specific query methods are deprecated in favor of the unified entities.get() API:
On SketchupModel: groups(), faces(), edges(), componentInstances(), images(), dimensionLinears(), dimensionRadials(), curves(), constructionPoints(), constructionLines(), snaps(), texts(), sectionPlanes(), activeSectionPlanes(), getActiveSectionPlane()
On Component: groups(), faces(), edges(), componentInstances(), images(), dimensionLinears(), dimensionRadials(), curves(), constructionPoints(), constructionLines(), snaps(), texts(), sectionPlanes(), curves(), getActiveSectionPlane()
On Group: groups(), faces(), edges(), componentInstances(), images(), dimensionLinears(), dimensionRadials(), curves(), constructionPoints(), constructionLines(), snaps(), texts(), sectionPlanes()
On Scene: activeSectionPlanes() - use getActiveSectionPlanes() instead
Migration Example:
// Old way (deprecated)const faces = await model.faces();const redGroups = await model.groups({ filter: 'attribute', dictionaryName: 'my_dict', attributeName: 'color', attributeValue: 'red'});
// New way (SDK 2.29.0)const faces = await model.entities.get({ filterBy: { types: ['Face'] } });const redGroups = await model.entities.get({ filterBy: { and: [ { types: ['Group'] }, { attribute: { dictionaryName: 'my_dict', attributeName: 'color', attributeValue: 'red' } } ] }});
// Type inference works automaticallyconst edges = await model.entities.get({ filterBy: { types: ['Edge'] } });// TypeScript knows `edges` is `Edge[]`2.28.2
Section titled “2.28.2”Added API version reporting to improve diagnostics.
New Properties:
- apiVersion - Returns the version of the JavaScript API
2.28.0 (Ruby version 3.15.0)
Section titled “2.28.0 (Ruby version 3.15.0)”Implemented Coordinate Reference System (CRS) Location API for geospatial mapping of SketchUp models to real-world coordinates.
The CRS Location API enables integration between SketchUp’s local coordinate system and standardized geospatial coordinate reference systems (typically EPSG codes). This feature supports bidirectional coordinate transformations, allowing models to be positioned accurately in real-world GIS workflows and mapping applications.
Feature Availability: SketchUp Desktop version 27 or later
CRS Location API:
- getCRSLocation() - Retrieve the CRS location from a model
- modelSetCRSLocation() - Set or clear the CRS location on a model
- CRSLocation class - Main class representing CRS location data with validation and transformation methods
2.27.0 (Ruby version 3.14.0)
Section titled “2.27.0 (Ruby version 3.14.0)”Implemented event-driven communication for bidirectional messaging between SketchUp and the client.
Event System:
- Send Event - Send custom events from client to SketchUp
- On Event - Register handlers for events from SketchUp
Web Extension Support:
- Extension - Handle commands triggered by Web Extension menus and toolbars
su:commandevent - Automatically sent when Web Extension commands are triggered
New Types:
EventHandle- Handle returned by event registration, can be used to remove the handlerEventHandler<T>- Type for event handler functionsCommandEvent- Event payload for Web Extension command events
Size Reduction:
- Internal refactors reduced bundle size by 4KB
- Changed the target es version to ES2022 reduced bundle size by 40KB
2.26.2
Section titled “2.26.2”Bug Fix
On ipad we cannot reliably detect when a page is being unloaded, this resulted in “already.connected” errors occurring.
To address this there is a new connection option replaceAlreadyConnected which defaults to True.
When true this will disconnect and reconnect upon receiving this error.
2.26.0 (Ruby version 3.13.0)
Section titled “2.26.0 (Ruby version 3.13.0)”Implemented Styles support
Style Queries:
Style Operations:
- Load Style
- Remove Style
- Purge Unused Styles
- Set Selected Style
- Update Selected Style
- Set Style Name
- Set Style Description
- Update Style Rendering Options
- Duplicate Style
New Types:
Style- Represents a SketchUp style with rendering option settingsStyleRef- Reference to a style entityActiveStyleInfo- Metadata about the currently active styleSelectedStyle- Selected style with its active state informationSketchupStyleLoadError- Error type for style loading failures
2.25.0 (Ruby version 3.12.0)
Section titled “2.25.0 (Ruby version 3.12.0)”Enhanced Face capabilities with UV queries, area calculations, connectivity queries, and texture management
Face UV Queries:
Face Area Queries:
Face Connectivity:
Face Operations:
- Follow Me
- Clear Front Texture Position
- Clear Back Texture Position
- Clear Front Texture Projection
- Clear Back Texture Projection
Geometry Utilities:
- Classify Point on Face - Determines if a point is inside, outside, on an edge, or on a vertex of a face
- Plane from Vertices - Static method to create a plane from a set of vertices
New Types:
FacePointClassificationenum - Classification for points relative to facesUVRequest/UVResponse- Types for UV coordinate queriesUVTileResponse- Type for UV tile information
2.24.3 (Ruby version 3.11.3)
Section titled “2.24.3 (Ruby version 3.11.3)”Internal improvements for vertex encoding
When both client and server support protocol version 1.21.1, vertices are now encoded using persistent IDs instead of entity IDs. This provides more stable vertex references across model operations.
The Vertex.sketchupId property now returns a persistent ID when supported by both client and server.
Ruby 3.11.1
Section titled “Ruby 3.11.1”- Reduce warnings when updating extensions that use the Ruby Library.
Bug Fix
When SketchUp reloads extensions it is unsafe to blindly require “tempfile”. Instead only load it if the class does not exist.
2.24.0 (Ruby 3.11.0)
Section titled “2.24.0 (Ruby 3.11.0)”Implemented Rendering Options support
Model Rendering Options:
Scene Rendering Options:
2.23.0 (Ruby 3.10.0)
Section titled “2.23.0 (Ruby 3.10.0)”Implemented Curve, ArcCurve, and Dimension entity support
Curve Creation:
- Create Curve
- Create Curve by Welding Edges
- Get Curve by Ref
- Get Curves on Model
- Get Curves on Group
- Get Curves on Component
ArcCurve Creation:
Dimension (General):
Linear Dimensions:
- Create Linear Dimension
- Set Linear Dimension Aligned Text Position
- Set Linear Dimension Text Position
- Set Linear Dimension Start
- Set Linear Dimension End
- Set Linear Dimension Offset
Radial Dimensions:
Improved Type Safety:
- Enhanced
entityForRefto provide proper type inference for all entity references - Added
EntityFor<T>utility type for mapping entity references to their concrete types
Deprecated Methods:
The following type-specific *ForRef methods are now deprecated in favor of the unified, type-safe entityForRef method:
componentForRef- useentityForRefinsteadcomponentInstanceForRef- useentityForRefinsteadedgeForRef- useentityForRefinsteadfaceForRef- useentityForRefinsteadgroupForRef- useentityForRefinsteadimageForRef- useentityForRefinsteadmaterialForRef- useentityForRefinsteadsceneForRef- useentityForRefinsteadtagForRef- useentityForRefinsteadtagFolderForRef- useentityForRefinsteaddrawingElementForRef- useentityForRefinsteadsectionPlaneForRef- useentityForRefinsteadconstructionPointForRef- useentityForRefinsteadconstructionLineForRef- useentityForRefinsteadsnapForRef- useentityForRefinsteadtextForRef- useentityForRefinstead
These methods will continue to work but may be removed in a future major version.
Ruby 3.9.1
Section titled “Ruby 3.9.1”Fix a crash on Windows related to open file handles while an application is running.
2.22.0 (Ruby 3.9.0)
Section titled “2.22.0 (Ruby 3.9.0)”Implemented Text entity support
- Create Text
- Get Text for Ref
- Set Arrow Type
- Set Display Leader
- Set Point
- Set Vector
- Set Text
- Set Line Weight
- Set Leader Type
- Set Attached To
- Get Texts on Model
- Get Texts on Group
- Get Texts on Component
See example
2.21.1
Section titled “2.21.1”Reduced visible surface area of SDK in pure JavaScript hiding details such as the protocol and communicator.
Marked some variables with an _ prefix, these will be available for debugging purposes but in general should not be accessed.
2.21.0 (Ruby 3.8.0)
Section titled “2.21.0 (Ruby 3.8.0)”Image Entity support:
- Create Image
- Set Image Dimensions
- Set Image Origin
- Apply Transformation to Image
- Set Image Transformation
- Set Image Glued To
- Get Image by Ref
- Get Images by Refs
- Get Images on Model
- Get Images on Group
- Get Images on Component
- Export Image Texture
Entity glueing support:
- Set Component Instance or Group Glued To
- Get Glued Instances on Face
- Component Instance Glued To ID
- Group Glued To ID
- Image Entity Glued To ID
Model improvements:
Improved type safety:
- All entity reference classes now include a
typefield for better type discrimination
2.20.0 (Ruby 3.7.0)
Section titled “2.20.0 (Ruby 3.7.0)”Implemented Snap support
See example
2.19.0 (Ruby 3.6.0)
Section titled “2.19.0 (Ruby 3.6.0)”New Tools API for monitoring and controlling SketchUp tools:
- Get Active Tool
- Clear Active Tool
- Stream Tool Changes
- Place Component Once
- Place Component Repeatedly
Component instance change streaming:
2.18.0
Section titled “2.18.0”Improve SDK around options by providing typed wrappers for the known providers.
- Get Scene Options
- Get Slideshow Options
- Update Options
- Update Unit Options
- Update Scene Options
- Update Scene Options
Breaking Changes
- Removed
model.options.customthis was never intended to be exposed in SU and nothing should be using it.
2.17.3
Section titled “2.17.3”Bugfix: Removed loading section_plane_queries.rb which doesn’t exist
2.17.2
Section titled “2.17.2”- Transform the planeLike to plane before reaching backend
2.17.1
Section titled “2.17.1”- Expose Color class via
SketchUpApi.Color
2.17.0
Section titled “2.17.0”2.16.0
Section titled “2.16.0”- Section Plane API improvements:
- Create Section Plane now requires a
Planeobject (see example). - Set Section Plane Symbol
- Set Section Plane Name
- Activate Section Plane
- Section plane queries now support server-side filtering for both model and scene queries
- Create Section Plane now requires a
2.15.1
Section titled “2.15.1”- Fix initialization order bugs in certain environments
- Allow for the communicator type to be set explicitly
2.15.0
Section titled “2.15.0”2.14.2
Section titled “2.14.2”- Added SketchUpApi export from index.ts so that consuming applications written in typescript no longer need to reach into window.Sketchup
- Added window.SketchUpApi for pure JS application usage
- Added a deprecation warning when accessing window.Sketchup or (Sketchup) from the browser
2.14.0 (Ruby 3.1.0)
Section titled “2.14.0 (Ruby 3.1.0)”Implemented selection support
Implemented transform by ID support
Bug Fixes
- Setting the shadow info “useSunForAllShading” on 2026.1 was not working due to a decoding issue.
2.13.0 (Ruby 3.0.0)
Section titled “2.13.0 (Ruby 3.0.0)”- Added registerTenantIFrame to enable nested JSA enabled contexts
2.12.4 (Ruby 2.9.2)
Section titled “2.12.4 (Ruby 2.9.2)”- Add better debug information when entity building fails with errors inside of SketchUp.
2.12.3 (Ruby 2.9.1)
Section titled “2.12.3 (Ruby 2.9.1)”- Fixed a bug when trying to delete an attribute dictionary that does not exist on an entity that has never had any attributes. As a workaround clients should do the following for older backends.
// check that the parent dictionary has subdictionaries before trying to deleteif (operation.model.attributes.getAttributesOfDictionary('dictionary')) { operation.modelDeleteAttributes(['dictionary', 'subdictionary']);}2.12.0 (Ruby 2.9.0)
Section titled “2.12.0 (Ruby 2.9.0)”Implemented texture support
Implemented export and import for materials
Implemented PBR property support
- Set Ambient Occlusion Enabled
- Set Metalness Enabled
- Set Roughness Enabled
- Set Normal Enabled
- Set Ambient Occlusion Strength
- Set Metallic Factor
- Set Roughness Factor
- Set Normal Scale
- Set Normal Style
Added support for transparent operations
2.11.0 (Ruby 2.8.0)
Section titled “2.11.0 (Ruby 2.8.0)”Implemented model exporting as skp file see Example
2.10.0 (Ruby 2.7.0)
Section titled “2.10.0 (Ruby 2.7.0)”Implemented scene supported
Added optional scene parameter to all Shadow Info operations
2.8.0 (Ruby 2.6.0)
Section titled “2.8.0 (Ruby 2.6.0)”Implemented Camera
Implemented View Screenshot
Implemented View Info
2.7.0 (Ruby 2.5.0)
Section titled “2.7.0 (Ruby 2.5.0)”Implemented construction points
Implemented construction lines
- Create Construction Lines
- Get Construction Points
- Set Start
- Set End
- Set Direction
- Set Position
- Set Stipple
- Reverse
2.6.0 (Ruby 2.4.0)
Section titled “2.6.0 (Ruby 2.4.0)”Implemented component loading
Implemented IFC classification
- Get Classification Schemas
- Load Schema
- Unload Schema
- Add Classification
- Remove Classification
- Set Classification Value
- Get Classification Value
Hosted static resources
- IFC 4 - https://cdn.habitat.sketchup.com/classifications/schemas/IFC4.skc
- IFC 2x3 - https://cdn.habitat.sketchup.com/classifications/schemas/IFC2x3.skc
- Created JSA playground to improve the onboarding experience
2.4.5 (Ruby 2.2.1)
Section titled “2.4.5 (Ruby 2.2.1)”- BugFix Fix a crash when deleting an attribute from a dictionary that does not exists
- Resolve queued connection requests on error
- Replace use of deprecated window.onunload with beforeunload
- Security Enable configuration of valid origins. See SketchUpApi.updateCommunicatorOptions
- Introduced SketchupOperation#componentInstanceSetName
- First public revision available on sketchup-virtual-npm