IModelConnection Namespace
Namespaces
Name | Description |
---|---|
IModelConnection.Categories |
Class
Name | Description |
---|---|
IModelConnection.Categories | Provides access to information about the Category's stored in an IModelConnection. |
IModelConnection.CodeSpecs | The collection of CodeSpec entities for an IModelConnection. |
IModelConnection.Elements | The collection of Elements for an IModelConnection. |
IModelConnection.Models | The collection of loaded ModelState objects for an IModelConnection. |
IModelConnection.Views | The collection of views for an IModelConnection. |
Interface
Name | Description |
---|---|
IModelConnection.GetPlacementsOptions | Options controlling the results produced by IModelConnection.Elements.getPlacements. |
IModelConnection.ViewSpec | The id/name/class of a ViewDefinition. |
Defined in
IModelConnection Class
A connection to a IModelDb hosted on the backend.
Extends
Extended by
Methods
Name | Description | |
---|---|---|
cartographicFromSpatial(spatial: Readonly<WritableXYAndZ>[]): Promise<Cartographic[]> | Convert points in this iModel's spatial coordinate system to Cartographic coordinates using either a GeoConverter or the iModel's EcefLocation. | |
cartographicToSpatial(cartographic: Cartographic, result?: Point3d): Promise<Point3d> | Convert a Cartographic to a point in this iModel's Spatial coordinates using a GeoConverter or[IModel.ecefLocation. | |
cartographicToSpatialFromGcs(cartographic: Cartographic, result?: Point3d): Promise<Point3d> | Convert a Cartographic to a point in this iModel's spatial coordinate system using a GeoConverter. | |
close(): Promise<void> Abstract | Close this IModelConnection. | |
createQueryReader(ecsql: string, params?: QueryBinder, config?: QueryOptions): ECSqlReader | Allow to execute query and read results along with meta data. | |
expandDisplayedExtents(range: Range3d): void | Expand this iModel's displayedExtents to include the specified range. | Deprecated |
findClassFor<T extends >(className: string, defaultClass: T): Promise<undefined | T> | Find the first registered base class of the given EntityState className. | |
generateElementMeshes(requestProps: ElementMeshRequestProps): Promise<Uint8Array> | Produce encoded Polyfaces from the geometry stream of a GeometricElement. | |
getGeometryContainment(requestProps: GeometryContainmentRequestProps): Promise<GeometryContainmentResponseProps> | Request element clip containment status from the backend. | |
getGeometrySummary(requestProps: GeometrySummaryRequestProps): Promise<string> | Obtain a summary of the geometry belonging to one or more GeometricElements suitable for debugging and diagnostics. | |
getMassProperties(requestProps: MassPropertiesRequestProps): Promise<MassPropertiesResponseProps> | Request element mass properties from the backend. | |
getMassPropertiesPerCandidate(requestProps: MassPropertiesPerCandidateRequestProps): Promise<MassPropertiesPerCandidateResponseProps[]> | Request mass properties for multiple elements from the backend. | |
Request a tooltip from the backend. | ||
isBlankConnection(): this is BlankConnection | Type guard for instanceof BlankConnection | |
isBriefcaseConnection(): this is BriefcaseConnection | Type guard for instanceof BriefcaseConnection | |
isCheckpointConnection(): this is CheckpointConnection | Type guard for instanceof CheckpointConnection | |
isSnapshotConnection(): this is SnapshotConnection | Type guard for instanceof SnapshotConnection | |
loadFontMap(): Promise<FontMap> | Load the FontMap for this IModelConnection. | |
query(ecsql: string, params?: QueryBinder, options?: QueryOptions): AsyncIterableIterator<any, any, any> | Execute a query and stream its results | Deprecated |
queryEntityIds(params: EntityQueryParams): Promise<Id64Set> | Query for a set of element ids that satisfy the supplied query params | |
queryRowCount(ecsql: string, params?: QueryBinder): Promise<number> | Compute number of rows that would be returned by the ECSQL. | Deprecated |
queryTextureData(textureLoadProps: TextureLoadProps): Promise<undefined | TextureData> | Request a named texture image from the backend. | |
restartQuery(token: string, ecsql: string, params?: QueryBinder, options?: QueryOptions): AsyncIterableIterator<any, any, any> | Cancel any previous query with same token and run execute the current specified query. | Deprecated |
spatialFromCartographic(cartographic: Cartographic[]): Promise<Point3d[]> | Convert Cartographic coordinates into points in this iModel's spatial coordinate system using a GeoConverter or the iModel's EcefLocation. | |
spatialToCartographic(spatial: Readonly<WritableXYAndZ>, 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 IModel.ecefLocation. | |
spatialToCartographicFromGcs(spatial: Readonly<WritableXYAndZ>, result?: Cartographic): Promise<Cartographic> | Convert a point in this iModel's Spatial coordinates to a Cartographic using the Geographic location services for this IModelConnection. | |
toSpatialFromGcs(geoCoords: Readonly<WritableXYAndZ>[], datumOrGCRS?: string | GeographicCRSProps): Promise<Point3d[]> | Convert geographic coordinates into points in this iModel's spatial coordinate system using a GeoConverter or the iModel's EcefLocation. | |
wgs84CartographicFromSpatial(spatial: Readonly<WritableXYAndZ>[]): Promise<Cartographic[]> | Convert points in this iModel's spatial coordinate system to Cartographic coordinates using either a GeoConverter or the iModel's EcefLocation. |
Inherited methods
Name | Inherited from | Description |
---|---|---|
cartographicToSpatialFromEcef(cartographic: Cartographic, result?: Point3d): Point3d Inherited | IModel | Convert a Cartographic to a point in this iModel's Spatial coordinates using its IModel.ecefLocation. |
ecefToSpatial(ecef: Readonly<WritableXYAndZ>, result?: Point3d): Point3d Inherited | IModel | Convert a point in ECEF coordinates to a point in this iModel's Spatial coordinates using its ecefLocation. |
getEcefTransform(): Transform Inherited | IModel | Get the Transform from this iModel's Spatial coordinates to ECEF coordinates using its IModel.ecefLocation. |
getRpcProps(): IModelRpcProps Inherited | IModel | Return a token for RPC operations. |
setEcefLocation(ecef: EcefLocationProps): void Inherited | IModel | Set the EcefLocation for this iModel. |
setGeographicCoordinateSystem(geoCRS: GeographicCRSProps): void Inherited | IModel | Sets the geographic coordinate reference system from GeographicCRSProps. |
spatialToCartographicFromEcef(spatial: Readonly<WritableXYAndZ>, result?: Cartographic): Cartographic Inherited | IModel | Convert a point in this iModel's Spatial coordinates to a Cartographic using its IModel.ecefLocation. |
spatialToEcef(spatial: Readonly<WritableXYAndZ>, result?: Point3d): Point3d Inherited | IModel | Convert a point in this iModel's Spatial coordinates to an ECEF point using its IModel.ecefLocation. |
toJSON(): IModelConnectionProps Inherited | IModel | Convert this iModel to a JSON representation. |
getDefaultSubCategoryId(categoryId: string): string Static Inherited | IModel | Get the default subCategoryId for the supplied categoryId |
Properties
Name | Type | Description | |
---|---|---|---|
categories Readonly | IModelConnection.Categories | The set of Category's in this IModelConnection. | |
codeSpecs Readonly | IModelConnection.CodeSpecs | The CodeSpecs in this IModelConnection. | |
connectionTimeout Static | number | The maximum time (in milliseconds) to wait before timing out the request to open a connection to a new iModel | |
displayedExtents Readonly | Range3d | The displayed extents of this iModel, initialized to IModel.projectExtents. | Deprecated |
elements Readonly | IModelConnection.Elements | The ElementStates in this IModelConnection. | |
fontMap | FontMap | undefined | The font map for this IModelConnection. | |
geoServices Readonly | GeoServices | The Geographic location services available for this iModelConnection. | |
hilited Readonly | HiliteSet | The set of currently hilited elements for this IModelConnection. | |
isBlank Accessor ReadOnly | boolean | True if this is a Blank Connection. | |
isBriefcase Accessor ReadOnly | boolean | Returns true if this is a briefcase copy of an iModel that is synchronized with iModelHub. |
|
isClosed Accessor Abstract ReadOnly | boolean | Check if the IModelConnection is closed (i.e. | |
isOpen Accessor ReadOnly | boolean | Check if the IModelConnection is open (i.e. | |
isReadonly Accessor ReadOnly | boolean | Check the openMode of this IModelConnection to see if it was opened read-only. | |
isSnapshot Accessor ReadOnly | boolean | Returns true if this is a snapshot iModel. |
|
models Readonly | IModelConnection.Models | The ModelStates in this IModelConnection. | |
onClose Readonly | BeEvent<(_imodel: IModelConnection) => void> | Event raised immediately before this IModelConnection is closed. | |
onClose Static Readonly | BeEvent<(_imodel: IModelConnection) => void> | Event raised immediately before any IModelConnection is closed. | |
onOpen Static Readonly | BeEvent<(_imodel: IModelConnection) => void> | Event called immediately after any IModelConnection is opened. | |
routingContext | IModelRoutingContext | The RPC routing for this connection. | |
selectionSet Readonly | SelectionSet | The set of currently selected elements for this IModelConnection. | |
tiles Readonly | Tiles | The set of Tiles for this IModelConnection. | |
transientIds Readonly | TransientIdSequence | Generator for unique Ids of transient graphics for this IModelConnection. | |
views Readonly | IModelConnection.Views | The ViewStates in this IModelConnection. |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
_openMode Protected Inherited | OpenMode | IModel | |
changeset Accessor Inherited | ChangesetIdWithIndex | IModel | |
dictionaryId Static Readonly Inherited | string | IModel | The Id of the dictionary model. |
ecefLocation Accessor Inherited | undefined | EcefLocation | IModel | The EcefLocation of the iModel in Earth Centered Earth Fixed coordinates. If the iModel property geographicCoordinateSystem is not defined then the ecefLocation provides a geolocation by defining a 3D coordinate system relative to the Earth model WGS84. Refer to additional documentation for details. If the geographicCoordinateSystem property is defined then the ecefLocation must be used with care. When the geographicCoordinateSystem is defined it indicates the iModel cartesian space is the result of a cartographic projection. This implies a flattening of the Earth surface process that results in scale, angular or area distortion. The ecefLocation is then an approximation calculated at the center of the project extent. If the project is more than 2 kilometer in size, the ecefLocation may represent a poor approximation of the effective cartographic projection used and a linear transformation should then be calculated at the exact origin of the data it must position. |
geographicCoordinateSystem Accessor Inherited | undefined | GeographicCRS | IModel | The geographic coordinate reference system of the iModel. |
globalOrigin Accessor Inherited | Point3d | IModel | An offset to be applied to all spatial coordinates. |
iModelId Accessor Inherited ReadOnly | undefined | string | IModel | The Guid that identifies this iModel. |
isGeoLocated Accessor Inherited ReadOnly | boolean | IModel | True if this iModel has an EcefLocation. |
iTwinId Accessor Inherited ReadOnly | undefined | string | IModel | The Guid that identifies the iTwin that owns this iModel. |
key Accessor Inherited ReadOnly | string | IModel | Get the key that was used to open this iModel. This is the value used for Rpc and Ipc communications. |
name Accessor Inherited | string | IModel | Name of the iModel |
onChangesetChanged Readonly Inherited | BeEvent<(previousChangeset: ChangesetIdWithIndex) => void> | IModel | Event raised after IModel.changeset changes. |
onEcefLocationChanged Readonly Inherited | BeEvent<(previousLocation: EcefLocation) => void> | IModel | Event raised after IModel.ecefLocation changes. |
onGeographicCoordinateSystemChanged Readonly Inherited | BeEvent<(previousGCS: GeographicCRS) => void> | IModel | Event raised after IModel.geographicCoordinateSystem changes. |
onGlobalOriginChanged Readonly Inherited | BeEvent<(previousOrigin: Point3d) => void> | IModel | Event raised after IModel.globalOrigin changes. |
onNameChanged Readonly Inherited | BeEvent<(previousName: string) => void> | IModel | Event raised after IModel.name changes. |
onProjectExtentsChanged Readonly Inherited | BeEvent<(previousExtents: Range3d) => void> | IModel | Event raised after IModel.projectExtents changes. |
onRootSubjectChanged Readonly Inherited | BeEvent<(previousSubject: RootSubjectProps) => void> | IModel | Event raised after IModel.rootSubject changes. |
openMode Accessor Inherited ReadOnly | OpenMode | IModel | The OpenMode used for this IModel. |
projectExtents Accessor Inherited | Range3d | IModel | The volume, in spatial coordinates, inside which the entire project is contained. |
repositoryModelId Static Readonly Inherited | string | IModel | The Id of the repository model. |
rootSubject Accessor Inherited | RootSubjectProps | IModel | The name and description of the root subject of this iModel |
rootSubjectId Static Readonly Inherited | string | IModel | The Id of the root subject element. |
Defined in
Last Updated: 13 January, 2025
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.