replaceViewedModels Method

Deprecated  in 5.16.0 - will not be removed until after 2027-12-03. Use clear on viewedModels and then addAndLoadViewedModels.

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

replaceViewedModels(modelIds: Id64Arg): Promise<void>

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

@note If any of the requested models is not yet loaded this function will asynchronously load them before updating the set of displayed models.

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

Returns - Promise

Defined in

Last Updated: 03 December, 2026