changeViewedModels Method

Deprecated  in 5.16.0 - will not be removed until after 2027-12-03. Use addAndLoadViewedModels.

Attempt to replace the set of models currently viewed by this viewport, if it is displaying a SpatialView

changeViewedModels(modelIds: Id64Arg): boolean

@returns false if this Viewport is not viewing a SpatialViewState

@note This function only works if the viewport is viewing a SpatialViewState, otherwise it does nothing.

@note This function returns immediately; any requested models that aren't yet loaded are subsequently loaded in the background.

@see replaceViewedModels for a similar function returning a promise that resolves after all unloaded models are loaded.

Parameter Type Description
modelIds Id64Arg The Ids of the models to be displayed.

Returns - boolean

false if this Viewport is not viewing a SpatialViewState

Defined in

Last Updated: 03 December, 2026