getViewList Method

Get an array of the ViewSpecs for all views in this IModel that satisfy a ViewQueryParams.

This is typically used to create a list for UI.

For example:

/** Get a list of Spatial views from an iModel. */
public static async getSpatialViews(): Promise<IModelConnection.ViewSpec[]> {
  return this._iModel.views.getViewList({ from: SpatialViewState.classFullName });
}

getViewList(queryParams: ViewQueryParams): Promise<IModelConnection.ViewSpec[]>

@throws IModelError If the generated statement is invalid or would return too many props.

Parameter Type Description
queryParams ViewQueryParams The parameters for the views to find. The limit and offset members should be used to page results.

Returns - Promise<IModelConnection.ViewSpec[]>

Defined in

Last Updated: 16 April, 2024