SnapshotDb Class

A snapshot iModel database file that is typically used for archival and data transfer purposes.

see Snapshot iModels

see About IModelDb




Name Description
close(): void Close this local read-only iModel snapshot, if it is currently open.  
createEmpty(filePath: string, options: CreateEmptySnapshotIModelProps): SnapshotDb Static Create an empty local Snapshot iModel file.  
createFrom(iModelDb: IModelDb, snapshotFile: string, options?: CreateSnapshotIModelProps): SnapshotDb Static Create a local Snapshot iModel file, using this iModel as a seed or starting point.  
openFile(filePath: string, props?: SnapshotOpenOptions): SnapshotDb Static Open a read-only iModel snapshot.  

Inherited methods

Name Inherited from Description
abandonChanges(): void IModelDb Abandon pending changes in this iModel.
cancelSnap(sessionId: string): void IModelDb Cancel a previously requested snap.
cartographicToSpatialFromEcef(cartographic: Cartographic, result?: Point3d): Point3d IModel Convert a Cartographic to a point in this iModel's Spatial coordinates using its ecefLocation.
clearSqliteStatementCache(): void IModelDb Empty the SqliteStatementCache for this iModel.
clearStatementCache(): void IModelDb Empty the ECSqlStatementCache for this iModel.
computeProjectExtents(options?: ComputeProjectExtentsOptions): ComputedProjectExtents IModelDb Compute an appropriate project extents for this iModel based on the ranges of all spatial elements.
constructEntity<T extends Entity>(props: EntityProps): T extends Entity IModelDb Construct an entity (Element or Model) from an iModel.
containsClass(classFullName: string): boolean IModelDb Query if this iModel contains the definition of the specified class.
deleteFileProperty(prop: FilePropertyProps): DbResult IModelDb delete a "file property" from this iModel
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.
embedFont(prop: FontProps): FontProps IModelDb  
exportGraphics(exportProps: ExportGraphicsOptions): DbResult IModelDb Export meshes suitable for graphics APIs from arbitrary geometry in elements in this IModelDb.
exportPartGraphics(exportProps: ExportPartGraphicsOptions): DbResult IModelDb Exports meshes suitable for graphics APIs from a specified GeometryPart
getBriefcaseId(): BriefcaseId IModelDb Get the briefcase Id of this iModel
getEcefTransform(): Transform IModel Get the Transform from this iModel's Spatial coordinates to ECEF coordinates using its ecefLocation.
getGeoCoordinatesFromIModelCoordinates(requestContext: ClientRequestContext, props: string): Promise<GeoCoordinatesResponseProps> IModelDb Get the GeoCoordinate (longitude, latitude, elevation) corresponding to each IModel Coordinate point in the input
getGeometryContainment(requestContext: ClientRequestContext, props: GeometryContainmentRequestProps): Promise<GeometryContainmentResponseProps> IModelDb Get the clip containment status for the supplied elements
getGuid(): GuidString IModelDb Get the GUID of this iModel.
getIModelCoordinatesFromGeoCoordinates(requestContext: ClientRequestContext, props: string): Promise<IModelCoordinatesResponseProps> IModelDb Get the IModel coordinate corresponding to each GeoCoordinate point in the input
getJsClass<T extends undefined>(classFullName: string): T extends undefined IModelDb Get the JavaScript class that handles a given entity class.
getMassProperties(requestContext: ClientRequestContext, props: MassPropertiesRequestProps): Promise<MassPropertiesResponseProps> IModelDb Get the mass properties for the supplied elements
IModelDb Get metadata for a class.
getRpcProps(): IModelRpcProps IModel Return a token that can be used to identify this iModel for RPC operations.
importSchemas(requestContext: ClientRequestContext | AuthorizedClientRequestContext, schemaFileNames: string[]): Promise<void> IModelDb Import an ECSchema.
isBriefcaseDb(): this IModelDb Type guard for instanceof BriefcaseDb
isSnapshotDb(): this IModelDb Type guard for instanceof SnapshotDb
prepareStatement(sql: string): ECSqlStatement IModelDb Prepare an ECSQL statement.
query(ecsql: string, bindings?: any[] | object, limitRows?: number, quota?: QueryQuota, priority?: QueryPriority): AsyncIterableIterator<any> IModelDb Execute a query and stream its results
queryEntityIds(params: EntityQueryParams): Id64Set IModelDb Query for a set of entity ids, given an EntityQueryParams
queryFilePropertyBlob(prop: FilePropertyProps): Uint8Array | undefined IModelDb Query a "file property" from this iModel, as a blob.
queryFilePropertyString(prop: FilePropertyProps): string | undefined IModelDb Query a "file property" from this iModel, as a string.
queryNextAvailableFileProperty(prop: FilePropertyProps): number IModelDb Query for the next available major id for a "file property" from this iModel.
queryRowCount(ecsql: string, bindings?: any[] | object): Promise<number> IModelDb Compute number of rows that would be returned by the ECSQL.
querySchemaVersion(schemaName: string): string | undefined IModelDb Query for a schema of the specified name in this iModel.
readFontJson(): string IModelDb  
requestSnap(requestContext: ClientRequestContext, sessionId: string, props: SnapRequestProps): Promise<SnapResponseProps> IModelDb  
restartQuery(token: string, ecsql: string, bindings?: any[] | object, limitRows?: number, quota?: QueryQuota, priority?: QueryPriority): AsyncIterableIterator<any> IModelDb Execute a query and stream its results
saveChanges(description?: string): void IModelDb Commit pending changes to this iModel.
saveFileProperty(prop: FilePropertyProps, strValue: string | undefined, blobVal?: Uint8Array): DbResult IModelDb Save a "file property" to this iModel
setEcefLocation(ecef: EcefLocationProps): void IModel Set the EcefLocation for this iModel.
spatialToCartographicFromEcef(spatial: XYAndZ, result?: Cartographic): Cartographic IModel Convert a point in this iModel's Spatial coordinates to a Cartographic using its ecefLocation.
spatialToEcef(spatial: XYAndZ, result?: Point3d): Point3d IModel Convert a point in this iModel's Spatial coordinates to an ECEF point using its ecefLocation.
tryPrepareStatement(sql: string): ECSqlStatement | undefined IModelDb Prepare an ECSQL statement.
updateEcefLocation(ecef: EcefLocation): void IModelDb Update the EcefLocation of this iModel.
updateIModelProps(): void IModelDb Update the IModelProps of this iModel in the database.
updateProjectExtents(newExtents: AxisAlignedBox3d): void IModelDb Update the project extents for this iModel.
withPreparedStatement<T>(ecsql: string, callback: (stmt: ECSqlStatement) => T): T IModelDb Use a prepared ECSQL statement.
findByKey(key: string): IModelDb Static IModelDb Find an already open IModelDb (considers all subclasses).
IModelDb Invoke a callback on each property of the specified class, optionally including superclass properties.
getDefaultSubCategoryId(categoryId: Id64String): Id64String Static IModel Get the default subCategoryId for the supplied categoryId


Name Type Description
filePath Accessor ReadOnly string The full path to the snapshot iModel file.  

Inherited properties

Name Type Inherited from Description
_edit ProtectedStatic "StandaloneEdit" = "StandaloneEdit" IModelDb  
_fontMap Protected undefined | FontMap IModelDb  
changeSetId Accessor ReadOnly string | undefined IModel The Id of the last changeset that was applied to this iModel.
codeSpecs Accessor ReadOnly CodeSpecs IModelDb Get the CodeSpecs in this IModel.
contextId Accessor ReadOnly GuidString | undefined IModel The Guid that identifies the context that owns this iModel.
defaultLimit Static 1000 IModelDb  
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 IModelDb.Elements IModelDb  
fontMap Accessor ReadOnly FontMap IModelDb  
globalOrigin Accessor Point3d IModel An offset to be applied to all spatial coordinates.
iModelId Accessor ReadOnly GuidString IModelDb The Guid that identifies this iModel.
isBriefcase Accessor ReadOnly boolean IModelDb Returns true if this is an iModel from iModelHub (briefcase)
isGeoLocated Accessor ReadOnly boolean IModel True if this iModel has an EcefLocation.
isReadonly Accessor ReadOnly boolean IModelDb Check if this iModel has been opened read-only or not.
isSnapshot Accessor ReadOnly boolean IModelDb Returns true if this is a snapshot iModel
maxLimit Static 10000 IModelDb  
models IModelDb.Models IModelDb  
name string IModel Name of the iModel
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.
relationships Accessor ReadOnly Relationships IModelDb Get the linkTableRelationships for this IModel
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.
tiles IModelDb  
txns TxnManager IModelDb  
views IModelDb.Views IModelDb  

Object Literals

Name Description
_concurrentQueryStats Protected  

Defined in

Last Updated: 18 November, 2020