changeViewedModel2d Method

Attempt to change the 2d Model this Viewport is displaying, if its ViewState is a ViewState2d.

changeViewedModel2d(baseModelId: string, options?: ChangeViewedModel2dOptions & ViewChangeOptions & MarginOptions): Promise<void>

@note This function only works if the viewport is viewing a ViewState2d, otherwise it does nothing. Also note that the Model of baseModelId should be the same type (Drawing or Sheet) as the current view.

@note this method clones the current ViewState2d and sets its baseModelId to the supplied value. The DisplayStyle and CategorySelector remain unchanged.

Parameter Type Description
baseModelId string The Id of the new 2d Model to be displayed.
options ChangeViewedModel2dOptions & ViewChangeOptions & MarginOptions options that determine how the new view is displayed

Returns - Promise

Defined in

Last Updated: 28 October, 2024