ViewCreator2d Class

Beta  API for creating a ViewState for a 2D model (GeometricModel2dState).

const viewCreator = new ViewCreator2d(imodel);
const models = await imodel.models.queryProps({ from: "BisCore.GeometricModel2d" });
if (models.length > 0)
const view = await viewCreator.createViewForModel(models[0].id!, models[0].classFullName);

Methods

Name Description
constructor(_imodel: IModelConnection): ViewCreator2d Constructs ViewCreator2d with ViewCreator2d.iModelConnection.  
createViewForModel(modelId: Id64String, modelType: string, options?: ViewCreator2dOptions): Promise<ViewState> Creates and returns view for given 2D model.  
isDrawingModelClass(modelType: string): boolean Static Checks to see if given model is of DrawingModelState.  
isSheetModelClass(modelType: string): boolean Static Checks to see if given model is of SheetModelState.  

Defined in

Last Updated: 05 November, 2020