Skip to content

SlideshowOptions

Settings that control how the scene slideshow plays back.

Access it from model.options.slideshowOptions. Use it to read or update whether the slideshow loops and how long each scene is displayed before advancing.

let model = await SketchUpApi.getActiveModel();
let opts = model.options.slideshowOptions;
console.log(opts.loopSlideshow);
// => true
console.log(opts.slideTime);
// => 1 (seconds per scene)
// Show each scene for 3 seconds
await opts.update({ SlideTime: 3 });
let updated = await opts.refresh();
console.log(updated.slideTime);
// => 3

Model

SDK 1.18.0

get loopSlideshow(): boolean

Whether the slideshow loops back to the first scene after the last one.

boolean


get name(): string

The internal name of this options provider, like 'SlideshowOptions'.

string


get slideTime(): number

How long each scene is displayed before advancing, in seconds, like 1.

number

refresh(): Promise<SlideshowOptions>

Re-fetches these options from SketchUp to pick up any changes the user has made since this snapshot was taken.

Promise<SlideshowOptions>

SDK 1.18.0


toString(): string

string


update(updates): Promise<string[]>

Applies updates to the slideshow settings. Returns an array of any keys that were rejected as invalid.

Parameter Type Description

updates

SlideshowOptionsUpdate

the properties to change

Promise<string[]>

rejected keys, or an empty array on success

SDK 1.18.0 protocol 1.15.0