Features
Feature flags for the connected SketchUp session.
As the SketchUp team releases new features for the JavaScript API, we will update this collection. Checking these flags will allow you to support updated capabilities in your extension, while ensuring your users on older versions of SketchUp can be shown friendly error messages, or whatever makes sense.
Access it from SketchUpApi.features after connecting. Each
feature corresponds to a minimum protocol version — if the
connected SketchUp supports it, the supportsXxx flag is
true. Each ensureSupportsXxx() method throws if the
feature is unavailable, which you can use to guard API calls.
Example
Section titled “Example”let { features } = SketchUpApi;
console.log(features.supportsScenes);// => trueconsole.log(features.supportsRenderingOptions);// => trueconsole.log(features.supportsCRSLocation);// => trueProperties
Section titled “Properties”ensureSupportsActivePath
Section titled “ensureSupportsActivePath”
readonlyensureSupportsActivePath: () =>void
Throws if active path is not supported.
Returns
Section titled “Returns”void
ensureSupportsColorizeType
Section titled “ensureSupportsColorizeType”
readonlyensureSupportsColorizeType: () =>void
Throws if colorize type is not supported.
Returns
Section titled “Returns”void
ensureSupportsCRSLocation
Section titled “ensureSupportsCRSLocation”
readonlyensureSupportsCRSLocation: () =>void
Throws if CRS location is not supported.
Returns
Section titled “Returns”void
ensureSupportsCurves
Section titled “ensureSupportsCurves”
readonlyensureSupportsCurves: () =>void
Throws if curves are not supported.
Returns
Section titled “Returns”void
ensureSupportsDimensions
Section titled “ensureSupportsDimensions”
readonlyensureSupportsDimensions: () =>void
Throws if dimensions are not supported.
Returns
Section titled “Returns”void
ensureSupportsFaceUVs
Section titled “ensureSupportsFaceUVs”
readonlyensureSupportsFaceUVs: () =>void
Throws if face UVs are not supported.
Returns
Section titled “Returns”void
ensureSupportsFollowMe
Section titled “ensureSupportsFollowMe”
readonlyensureSupportsFollowMe: () =>void
Throws if follow-me is not supported.
Returns
Section titled “Returns”void
ensureSupportsImageEntity
Section titled “ensureSupportsImageEntity”
readonlyensureSupportsImageEntity: () =>void
Throws if image entity is not supported.
Returns
Section titled “Returns”void
ensureSupportsModelExport
Section titled “ensureSupportsModelExport”
readonlyensureSupportsModelExport: () =>void
Throws if model export is not supported.
Returns
Section titled “Returns”void
ensureSupportsModifyingModelOptions
Section titled “ensureSupportsModifyingModelOptions”
readonlyensureSupportsModifyingModelOptions: () =>void
Throws if modifying model options is not supported.
Returns
Section titled “Returns”void
ensureSupportsPlaceComponent
Section titled “ensureSupportsPlaceComponent”
readonlyensureSupportsPlaceComponent: () =>void
Throws if place component is not supported.
Returns
Section titled “Returns”void
ensureSupportsRenderingOptions
Section titled “ensureSupportsRenderingOptions”
readonlyensureSupportsRenderingOptions: () =>void
Throws if rendering options are not supported.
Returns
Section titled “Returns”void
ensureSupportsScenes
Section titled “ensureSupportsScenes”
readonlyensureSupportsScenes: () =>void
Throws if scenes are not supported.
Returns
Section titled “Returns”void
ensureSupportsSectionPlanes
Section titled “ensureSupportsSectionPlanes”
readonlyensureSupportsSectionPlanes: () =>void
Throws if section planes are not supported.
Returns
Section titled “Returns”void
ensureSupportsSelection
Section titled “ensureSupportsSelection”
readonlyensureSupportsSelection: () =>void
Throws if selection is not supported.
Returns
Section titled “Returns”void
ensureSupportsSkm
Section titled “ensureSupportsSkm”
readonlyensureSupportsSkm: () =>void
Throws if SKM is not supported.
Returns
Section titled “Returns”void
ensureSupportsSnaps
Section titled “ensureSupportsSnaps”
readonlyensureSupportsSnaps: () =>void
Throws if snaps are not supported.
Returns
Section titled “Returns”void
ensureSupportsStyles
Section titled “ensureSupportsStyles”
readonlyensureSupportsStyles: () =>void
Throws if styles are not supported.
Returns
Section titled “Returns”void
ensureSupportsText
Section titled “ensureSupportsText”
readonlyensureSupportsText: () =>void
Throws if text is not supported.
Returns
Section titled “Returns”void
ensureSupportsTextures
Section titled “ensureSupportsTextures”
readonlyensureSupportsTextures: () =>void
Throws if textures are not supported.
Returns
Section titled “Returns”void
supportCurves
Section titled “supportCurves”
readonlysupportCurves:boolean
true if curve operations are supported (protocol ≥ 1.20.0).
supportsActivePath
Section titled “supportsActivePath”
readonlysupportsActivePath:boolean
true if active path queries are supported (protocol ≥ 1.14.0).
supportsColorAttributes
Section titled “supportsColorAttributes”
readonlysupportsColorAttributes:boolean
true if color attribute operations are supported.
supportsColorizeType
Section titled “supportsColorizeType”
readonlysupportsColorizeType:boolean
true if material colorize type is supported (protocol ≥ 1.12.0).
supportsConstructionPoints
Section titled “supportsConstructionPoints”
readonlysupportsConstructionPoints:boolean
true if construction point queries are supported (protocol ≥ 1.5.0).
supportsCRSLocation
Section titled “supportsCRSLocation”
readonlysupportsCRSLocation:boolean
true if CRS location operations are supported (protocol ≥ 1.25.0).
supportsDimensions
Section titled “supportsDimensions”
readonlysupportsDimensions:boolean
true if dimension entities are supported.
supportsEvents
Section titled “supportsEvents”
readonlysupportsEvents:boolean
true if JS Extension events are supported (protocol ≥ 1.24.0).
supportsFaceConnections
Section titled “supportsFaceConnections”
readonlysupportsFaceConnections:boolean
true if face connection queries are supported.
supportsFaceUVs
Section titled “supportsFaceUVs”
readonlysupportsFaceUVs:boolean
true if face UV queries are supported (protocol ≥ 1.22.0).
supportsFollowMe
Section titled “supportsFollowMe”
readonlysupportsFollowMe:boolean
true if the follow-me tool is supported.
supportsGetArea
Section titled “supportsGetArea”
readonlysupportsGetArea:boolean
true if face area queries are supported.
supportsGlueing
Section titled “supportsGlueing”
readonlysupportsGlueing:boolean
true if gluing operations are supported.
supportsImageEntity
Section titled “supportsImageEntity”
readonlysupportsImageEntity:boolean
true if image entity operations are supported (protocol ≥ 1.18.0).
supportsMaterialThumbnails
Section titled “supportsMaterialThumbnails”
readonlysupportsMaterialThumbnails:boolean
true if material thumbnails are supported.
supportsModelExport
Section titled “supportsModelExport”
readonlysupportsModelExport:boolean
true if model export is supported (protocol ≥ 1.8.0).
supportsModifyingModelOptions
Section titled “supportsModifyingModelOptions”
readonlysupportsModifyingModelOptions:boolean
true if model options can be modified (protocol ≥ 1.15.0).
supportsPlaceComponent
Section titled “supportsPlaceComponent”
readonlysupportsPlaceComponent:boolean
true if the place-component tool is supported (protocol ≥ 1.16.0).
supportsRenderingOptions
Section titled “supportsRenderingOptions”
readonlysupportsRenderingOptions:boolean
true if rendering option queries are supported (protocol ≥ 1.21.0).
supportsScenes
Section titled “supportsScenes”
readonlysupportsScenes:boolean
true if scene queries are supported (protocol ≥ 1.7.0).
supportsScreenshotRenderOptions
Section titled “supportsScreenshotRenderOptions”
readonlysupportsScreenshotRenderOptions:boolean
true if screenshot render options (scale, etc.) are supported (protocol ≥ 1.25.2).
supportsSectionPlanes
Section titled “supportsSectionPlanes”
readonlysupportsSectionPlanes:boolean
true if section plane operations are supported (protocol ≥ 1.13.0).
supportsSelection
Section titled “supportsSelection”
readonlysupportsSelection:boolean
true if selection queries are supported (protocol ≥ 1.11.0).
supportsSkm
Section titled “supportsSkm”
readonlysupportsSkm:boolean
true if SKM material loading is supported.
supportsSnaps
Section titled “supportsSnaps”
readonlysupportsSnaps:boolean
true if snap point queries are supported (protocol ≥ 1.17.0).
supportsStyles
Section titled “supportsStyles”
readonlysupportsStyles:boolean
true if style operations are supported (protocol ≥ 1.23.0).
supportsTenants
Section titled “supportsTenants”
readonlysupportsTenants:boolean
true if multi-tenant model access is supported (protocol ≥ 1.10.0).
supportsText
Section titled “supportsText”
readonlysupportsText:boolean
true if text entity operations are supported (protocol ≥ 1.19.0).
supportsTextures
Section titled “supportsTextures”
readonlysupportsTextures:boolean
true if texture operations are supported (protocol ≥ 1.9.0).
supportsTransparentOperations
Section titled “supportsTransparentOperations”
readonlysupportsTransparentOperations:boolean
true if transparent operation overlays are supported.
supportsVertexPersistentIds
Section titled “supportsVertexPersistentIds”
readonlysupportsVertexPersistentIds:boolean
true if vertex persistent IDs are supported (protocol ≥ 1.21.1).
Methods
Section titled “Methods”toString()
Section titled “toString()”toString():
string
Returns
Section titled “Returns”string