insertFromTo MethodStatic
insertFromTo(txn, elProps, linearElementId, fromToPosition)
Insert a new LinearlyLocated element into an iModel at a specific from-to location along an existing Linear-Element.
insertFromTo(txn: EditTxn, elProps: ElementProps, linearElementId: string, fromToPosition: LinearlyReferencedFromToLocationProps): string
@returns The newly inserted element's Id.
@throws IModelError if unable to insert the element.
| Parameter | Type | Description |
|---|---|---|
| txn | EditTxn | The EditTxn used to perform inserts. |
| elProps | ElementProps | The properties of the new element. |
| linearElementId | string | The Id of the Linear-Element along which the new LinearlyLocated will be inserted. |
| fromToPosition | LinearlyReferencedFromToLocationProps | Linear position. |
Returns - string
The newly inserted element's Id.
insertFromTo(iModel, elProps, linearElementId, fromToPosition)
Deprecated Use LinearlyLocated.insertFromTo(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
Insert a new LinearlyLocated element into an iModel at a specific from-to location along an existing Linear-Element.
insertFromTo(iModel: IModelDb, elProps: ElementProps, linearElementId: string, fromToPosition: LinearlyReferencedFromToLocationProps): string
@returns The newly inserted element's Id.
@throws IModelError if unable to insert the element.
| Parameter | Type | Description |
|---|---|---|
| iModel | IModelDb | The iModel to insert the new element into. |
| elProps | ElementProps | The properties of the new element. |
| linearElementId | string | The Id of the Linear-Element along which the new LinearlyLocated will be inserted. |
| fromToPosition | LinearlyReferencedFromToLocationProps | Linear position. |
Returns - string
The newly inserted element's Id.
Defined in
Last Updated: 25 April, 2026