API Reference > imodeljs-frontend > Views > Viewport > replaceViewedModels replaceViewedModels Method 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<void> Defined in core/frontend/src/Viewport.ts Line 1047 Last Updated: 13 June, 2024