ViewCreator2d Class
API for creating a ViewState2d for a 2D model (GeometricModel2dState).
@see ViewCreator3d to create a view for a 3d model. Example usage:
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!);
Methods
Name | Description | |
---|---|---|
constructor(_imodel: IModelConnection): ViewCreator2d | Constructs a ViewCreator2d using an IModelConnection. | |
createViewForModel(modelId: string, options?: ViewCreator2dOptions): Promise<ViewState> | Creates and returns view for the 2D model id passed in. |
Defined in
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.