SnapshotConnection Class

A connection to a SnapshotDb hosted on the backend.

Extends

Implements

Methods

Name Description
close(): Promise<void> Close this SnapshotConnection.  
openFile(filePath: string): Promise<SnapshotConnection> Static Open an IModelConnection to a read-only snapshot iModel from a file name.  
openRemote(fileKey: string): Promise<SnapshotConnection> Static Open an IModelConnection to a remote read-only snapshot iModel from a key that will be resolved by the backend.  

Inherited methods

Name Inherited from Description
cartographicToSpatial(cartographic: Cartographic, result?: Point3d): Promise<Point3d> IModelConnection Convert a Cartographic to a point in this iModel's Spatial coordinates using the Geographic location services for this IModelConnection or ecefLocation.
cartographicToSpatialFromEcef(cartographic: Cartographic, result?: Point3d): Point3d IModel Convert a Cartographic to a point in this iModel's Spatial coordinates using its ecefLocation.
cartographicToSpatialFromGcs(cartographic: Cartographic, result?: Point3d): Promise<Point3d> IModelConnection Convert a Cartographic to a point in this iModel's Spatial coordinates using the Geographic location services for this IModelConnection.
ecefToSpatial(ecef: XYAndZ, result?: Point3d): Point3d IModel Convert a point in ECEF coordinates to a point in this iModel's Spatial coordinates using its ecefLocation.
findClassFor<T extends undefined>(className: string, defaultClass: T extends undefined | undefined): Promise<T extends undefined | undefined> IModelConnection Find the first registered base class of the given EntityState className.
getEcefTransform(): Transform IModel Get the Transform from this iModel's Spatial coordinates to ECEF coordinates using its ecefLocation.
getMassProperties(requestProps: MassPropertiesRequestProps): Promise<MassPropertiesResponseProps> IModelConnection Request element mass properties from the backend.
getRpcProps(): IModelRpcProps IModel Return a token that can be used to identify this iModel for RPC operations.
getToolTipMessage(id: Id64String): Promise<string[]> IModelConnection Request a tooltip from the backend.
isBlankConnection(): this IModelConnection Type guard for instanceof BlankConnection
isBriefcaseConnection(): this IModelConnection Type guard for instanceof BriefcaseConnection
isRemoteBriefcaseConnection(): this IModelConnection Type guard for instanceof RemoteBriefcaseConnection
isSnapshotConnection(): this IModelConnection Type guard for instanceof SnapshotConnection
loadFontMap(): Promise<FontMap> IModelConnection Load the FontMap for this IModelConnection.
query(ecsql: string, bindings?: any[] | object, limitRows?: number, quota?: QueryQuota, priority?: QueryPriority): AsyncIterableIterator<any> IModelConnection Execute a query and stream its results
queryEntityIds(params: EntityQueryParams): Promise<Id64Set> IModelConnection Query for a set of element ids that satisfy the supplied query params
queryRowCount(ecsql: string, bindings?: any[] | object): Promise<number> IModelConnection Compute number of rows that would be returned by the ECSQL.
requestSnap(props: SnapRequestProps): Promise<SnapResponseProps> IModelConnection Request a snap from the backend.
saveChanges(description?: string): Promise<void> IModelConnection Commit pending changes to this iModel
spatialToCartographic(spatial: XYAndZ, result?: Cartographic): Promise<Cartographic> IModelConnection Convert a point in this iModel's Spatial coordinates to a Cartographic using the Geographic location services for this IModelConnection or ecefLocation.
spatialToCartographicFromEcef(spatial: XYAndZ, result?: Cartographic): Cartographic IModel Convert a point in this iModel's Spatial coordinates to a Cartographic using its ecefLocation.
spatialToCartographicFromGcs(spatial: XYAndZ, result?: Cartographic): Promise<Cartographic> IModelConnection Convert a point in this iModel's Spatial coordinates to a Cartographic using the Geographic location services for this IModelConnection.
spatialToEcef(spatial: XYAndZ, result?: Point3d): Point3d IModel Convert a point in this iModel's Spatial coordinates to an ECEF point using its ecefLocation.
updateProjectExtents(newExtents: AxisAlignedBox3d): Promise<void> IModelConnection Update the project extents of this iModel.
getDefaultSubCategoryId(categoryId: Id64String): Id64String Static IModel Get the default subCategoryId for the supplied categoryId

Properties

Name Type Description
iModelId Accessor ReadOnly GuidString The Guid that identifies this iModel.  
isClosed Accessor ReadOnly boolean Returns true if SnapshotConnection.close has already been called.  
isRemote Accessor ReadOnly boolean Returns true if this is a connection to a remote snapshot iModel resolved by the backend.  

Inherited properties

Name Type Inherited from Description
changeSetId Accessor ReadOnly string | undefined IModel The Id of the last changeset that was applied to this iModel.
codeSpecs BriefcaseConnection.CodeSpecs IModelConnection The CodeSpecs in this IModelConnection.
connectionTimeout Static number IModelConnection The maximum time (in milliseconds) to wait before timing out the request to open a connection to a new iModel
contextId Accessor ReadOnly GuidString | undefined IModel The Guid that identifies the context that owns this iModel.
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.
elements BriefcaseConnection.Elements IModelConnection The ElementStates in this IModelConnection.
fontMap undefined | FontMap IModelConnection The font map for this IModelConnection.
globalOrigin Accessor Point3d IModel An offset to be applied to all spatial coordinates.
hilited HiliteSet IModelConnection The set of currently hilited elements for this IModelConnection.
isBlank Accessor ReadOnly boolean IModelConnection True if this is a Blank Connection.
isBriefcase Accessor ReadOnly boolean IModelConnection Returns true if this is a briefcase copy of an iModel that is synchronized with iModelHub.
isGeoLocated Accessor ReadOnly boolean IModel True if this iModel has an EcefLocation.
isOpen Accessor ReadOnly boolean IModelConnection Check if the IModelConnection is open (i.e. it has a connection to a backend server).
Returns false for BlankConnection instances and after IModelConnection.close has been called.
isReadonly Accessor ReadOnly boolean IModelConnection Check the IModelConnection.openMode of this IModelConnection to see if it was opened read-only.
isSnapshot Accessor ReadOnly boolean IModelConnection Returns true if this is a snapshot iModel.
models BriefcaseConnection.Models IModelConnection The ModelStates in this IModelConnection.
name string IModel Name of the iModel
onClose Static BeEvent<(_imodel: IModelConnection) => void> IModelConnection Event called immediately before any IModelConnection is closed.
onClose BeEvent<(_imodel: IModelConnection) => void> IModelConnection Event called immediately before this IModelConnection is closed.
onOpen Static BeEvent<(_imodel: IModelConnection) => void> IModelConnection Event called immediately after any IModelConnection is opened.
openMode OpenMode IModel The OpenMode used for this 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.
selectionSet SelectionSet IModelConnection The set of currently selected elements for this IModelConnection.
tiles Tiles IModelConnection The set of Tiles for this IModelConnection.
transientIds TransientIdSequence IModelConnection Generator for unique Ids of transient graphics for this IModelConnection.
views BriefcaseConnection.Views IModelConnection The IModelConnection.ViewStates in this IModelConnection.

Defined in

Last Updated: 13 May, 2020