queryElementIdByCode Method
Query for the Id of the element that has a specified code. This method is for the case where you know the element's Code. If you only know the code value, then in the simplest case, you can query on that and filter the results. In the simple case, call queryEntityIds, specifying the code value in the where clause of the query params. Or, you can execute an ECSQL select statement. See frequently used ECSQL queries for an example.
queryElementIdByCode(code: Required<CodeProps>): undefined | string
@returns The element that uses the code or undefined if the code is not used.
@throws IModelError if the code is invalid
Parameter | Type | Description |
---|---|---|
code | Required<CodeProps> | The code to look for |
Returns - undefined | string
The element that uses the code or undefined if the code is not used.
Defined in
- core/backend/src/IModelDb.ts Line 1848
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.