getFromToLocation MethodStatic

Query for the single LinearlyReferenced FromToLocation aspect owned by the specified LinearlyLocated Element. If more than one aspect is expected, use getFromToLocations instead.

getFromToLocation(iModel: IModelDb, linearlyLocatedElementId: string): LinearlyReferencedFromToLocation | undefined

@returns Returns an LinearlyReferencedFromToLocation or undefined is none is found.

@throws IModelError

Parameter Type Description
iModel IModelDb The iModel to query from.
linearlyLocatedElementId string The id of the LinearlyLocated Element to query about.

Returns - LinearlyReferencedFromToLocation | undefined

Returns an LinearlyReferencedFromToLocation or undefined is none is found.

Defined in

Last Updated: 28 April, 2026