IModelConnection Class
A connection to an iModel database hosted on the backend.
Extends
Implements
Methods
Name |
Description |
|
cartographicToSpatial(cartographic: Cartographic, result?: Primitives.Point3d): Promise<Point3d> |
Convert a Cartographic to a point in this iModel's Spatial coordinates using the Geographic location services for this IModelConnection or ecefLocation. |
|
cartographicToSpatialFromGcs(cartographic: Cartographic, result?: Primitives.Point3d): Promise<Point3d> |
Convert a Cartographic to a point in this iModel's Spatial coordinates using the Geographic location services for this IModelConnection. |
|
close(): Promise<void> |
Close this IModelConnection |
|
closeSnapshot(): Promise<void> |
Close this IModelConnection to a read-only iModel snapshot. |
Beta
|
findClassFor<T extends undefined>(className: string, defaultClass: T extends undefined | undefined): Promise<T extends undefined | undefined> |
Find the first registered base class of the given EntityState className. |
|
getMassProperties(requestProps: MassPropertiesRequestProps): Promise<MassPropertiesResponseProps> |
Request element mass properties from the backend. |
Beta
|
getToolTipMessage(id: Id64String): Promise<string[]> |
Request a tooltip from the backend. |
|
loadFontMap(): Promise<FontMap> |
Load the FontMap for this IModelConnection. |
|
query(ecsql: string, bindings?: any[] | object, limitRows?: number, quota?: QueryQuota, priority?: QueryPriority): AsyncIterableIterator<any> |
Execute a query and stream its results |
Beta
|
queryEntityIds(params: EntityQueryParams): Promise<Id64Set> |
Query for a set of element ids that satisfy the supplied query params |
|
queryRowCount(ecsql: string, bindings?: any[] | object): Promise<number> |
Compute number of rows that would be returned by the ECSQL. |
|
requestSnap(props: SnapRequestProps): Promise<SnapResponseProps> |
Request a snap from the backend. |
|
saveChanges(description?: string): Promise<void> |
Commit pending changes to this iModel |
|
spatialToCartographic(spatial: XYAndZ, result?: Cartographic): Promise<Cartographic> |
Convert a point in this iModel's Spatial coordinates to a Cartographic using the Geographic location services for this IModelConnection or ecefLocation. |
|
spatialToCartographicFromGcs(spatial: XYAndZ, result?: Cartographic): Promise<Cartographic> |
Convert a point in this iModel's Spatial coordinates to a Cartographic using the Geographic location services for this IModelConnection. |
|
updateProjectExtents(newExtents: AxisAlignedBox3d): Promise<void> |
Update the project extents of this iModel. |
|
createBlank(props: BlankConnectionProps): IModelConnection Static |
Create a new Blank IModelConnection. |
Beta
|
open(contextId: string, iModelId: string, openMode: OpenMode = OpenMode.Readonly, version: IModelVersion = IModelVersion.latest()): Promise<IModelConnection> Static |
Open an IModelConnection to an iModel. |
|
openSnapshot(fileName: string): Promise<IModelConnection> Static |
Open an IModelConnection to a read-only iModel snapshot (not managed by iModelHub) from a file name that is resolved by the backend. |
Beta
|
Inherited methods
Properties
Inherited properties
Name |
Type |
Inherited from |
Description |
dictionaryId Static |
Id64String |
IModel |
The Id of the dictionary model. |
ecefLocation Accessor ReadOnly |
EcefLocation | undefined |
IModel |
The EcefLocation of the iModel in Earth Centered Earth Fixed coordinates. |
globalOrigin Accessor |
Point3d |
IModel |
An offset to be applied to all spatial coordinates. |
iModelToken Accessor ReadOnly |
IModelToken |
IModel |
The token that can be used to find this iModel instance. |
isGeoLocated Accessor ReadOnly |
boolean |
IModel |
True if this iModel has an EcefLocation. |
name |
string |
IModel |
Name of the iModel |
projectExtents Accessor |
AxisAlignedBox3d |
IModel |
The volume, in spatial coordinates, inside which the entire project is contained. |
repositoryModelId Static |
Id64String |
IModel |
The Id of the repository model. |
rootSubject |
RootSubjectProps |
IModel |
The name and description of the root subject of this iModel |
rootSubjectId Static |
Id64String |
IModel |
The Id of the root subject element. |
Defined in
Last Updated:
05 June, 2020