ConnectOptions
Options you can pass when establishing the connection to SketchUp.
All properties are optional — calling SketchUpApi.connect()
with no arguments uses sensible defaults. The most common
reason to provide options is to enable diagnostics logging
during development or to tune chunk sizes for large models.
Example
Section titled “Example”// Connect with diagnostics enabledawait SketchUpApi.connect({ clientDiagnostics: true, serverDiagnostics: true,});Properties
Section titled “Properties”clientDiagnostics?
Section titled “clientDiagnostics?”
readonlyoptionalclientDiagnostics?:boolean
When true, the SDK logs every message it receives from
SketchUp. Useful for debugging communication issues.
queryChunkBatchSize?
Section titled “queryChunkBatchSize?”
readonlyoptionalqueryChunkBatchSize?:number
How many data chunks to send per message during a query.
Higher values transfer more data per round-trip, which can
speed up large queries. However, very large messages may
degrade performance. Defaults to 8192.
replaceAlreadyConnected?
Section titled “replaceAlreadyConnected?”
readonlyoptionalreplaceAlreadyConnected?:boolean
Whether to automatically reconnect if SketchUp reports an
existing connection. When true (the default), if SketchUp
responds with “already connected,” the SDK will disconnect
the stale session and retry once. Set to false if you want
to handle this situation yourself.
SDK 2.26.2
serverDiagnostics?
Section titled “serverDiagnostics?”
readonlyoptionalserverDiagnostics?:boolean
When true, SketchUp logs every message it receives from
your extension. Useful for debugging communication issues.
whenOperationInProgress?
Section titled “whenOperationInProgress?”
readonlyoptionalwhenOperationInProgress?:OperationInProgressResolution
Global configuration for how concurrent operations are handled.
Example
Section titled “Example”queue up all operations
await SketchUpApi.connect({whenOperationInProgress: 'queue'});Default
Section titled “Default”'error'SDK 2.36.0