insert MethodStatic
insert(txn, parentSubjectId, name, isPlanProjection?) @beta
Insert a SpatialLocationPartition and a SpatialLocationModel that sub-models it using an explicit transaction.
insert(txn: EditTxn, parentSubjectId: string, name: string, isPlanProjection?: boolean): string
@returns The Id of the newly inserted SpatialLocationPartition and SpatialLocationModel (same value).
@throws IModelError if there is an insert problem. *
| Parameter | Type | Description |
|---|---|---|
| txn | EditTxn | The EditTxn used to perform inserts. |
| parentSubjectId | string | The SpatialLocationPartition will be inserted as a child of this Subject element. |
| name | string | The name of the SpatialLocationPartition that the new SpatialLocationModel will sub-model. |
| isPlanProjection | boolean | Optional value (default is false) that indicates if the contents of this model are expected to be in an XY plane. |
Returns - string
The Id of the newly inserted SpatialLocationPartition and SpatialLocationModel (same value).
insert(iModelDb, parentSubjectId, name, isPlanProjection?)
Deprecated in 5.1.9 - will not be removed until after 2026-08-04. Use SpatialLocationModel.insert(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
insert(iModelDb: IModelDb, parentSubjectId: string, name: string, isPlanProjection?: boolean): string
| Parameter | Type | Description |
|---|---|---|
| iModelDb | IModelDb | |
| parentSubjectId | string | |
| name | string | |
| isPlanProjection | boolean |
Returns - string
Defined in
- backend/src/Model.ts Line 565
Last Updated: 07 May, 2026
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.