Skip to content

SelectedStyle

The currently active style and whether it has unsaved changes.

Retrieve it with model.getSelectedStyle(). The style property gives you the Style object, and info tells you whether rendering options have been changed since the style was last saved.

let model = await SketchUpApi.getActiveModel();
let selected = await model.getSelectedStyle();
console.log(selected.style.name);
// => '[Architectural Design Style]'
console.log(selected.info.hasBeenModified);
// => true if rendering options were changed

SDK 2.26.0 Protocol 1.23.0

readonly info: Readonly<ActiveStyleInfo>

Metadata about the active style, including modification state.


readonly style: Style

The active Style object.