Skip to content

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.

// Connect with diagnostics enabled
await SketchUpApi.connect({
clientDiagnostics: true,
serverDiagnostics: true,
});

readonly optional clientDiagnostics?: boolean

When true, the SDK logs every message it receives from SketchUp. Useful for debugging communication issues.


readonly optional queryChunkBatchSize?: 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.


readonly optional replaceAlreadyConnected?: 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


readonly optional serverDiagnostics?: boolean

When true, SketchUp logs every message it receives from your extension. Useful for debugging communication issues.


readonly optional whenOperationInProgress?: OperationInProgressResolution

Global configuration for how concurrent operations are handled.

queue up all operations

await SketchUpApi.connect({whenOperationInProgress: 'queue'});

OperationOptions

'error'

SDK 2.36.0