Skip to content

ActiveStyleInfo

Metadata about the currently active style in a SketchUp model.

Styles control how a model looks — edge rendering, face colors, background, watermarks, and more. This class tells you which style the user currently has selected and whether they’ve modified any rendering options since selecting it. You’ll access this through the info property on a SelectedStyle.

let model = await SketchUpApi.getActiveModel();
let style = await model.getSelectedStyle();
let info = style.info;
// Check which style is active
console.log('Style:', info.name);
console.log('File:', info.fileName);
console.log('Description:', info.description);
// Has the user tweaked rendering settings?
if (info.hasBeenModified) {
console.log('Style has unsaved changes.');
} else {
console.log('Style is unmodified.');
}

Model.getSelectedStyle

SDK 2.26.0 Protocol 1.23.0

readonly description: string

A text description of the style.


readonly fileName: string

The file name of this style on disk.


readonly hasBeenModified: boolean

Whether rendering options have been changed since the user selected this style.


readonly name: string

The display name of the active style, like '[Architectural Design Style]'.