importSchemas Method

Import an ECSchema. On success, the schema definition is stored in the iModel. This method is asynchronous (must be awaited) because, in the case where this IModelId is a briefcase, this method must first obtain the schema lock from the IModel server. You must import a schema into an iModel before you can insert instances of the classes in that schema. See IModelDb.Element

importSchemas(requestContext: ClientRequestContext | AuthorizedClientRequestContext, schemaFileNames: string[]): Promise<void>

throws IModelError if the schema lock cannot be obtained.

see IModelDb.containsClass

Parameter Type Description
requestContext ClientRequestContext | AuthorizedClientRequestContext The client request context
schemaFileNames string[]  

Defined in

Last Updated: 20 September, 2019