With the Query API you can access additional information about nodes.
Query Object Structure
The query object is a JSON object which contains a select and a conditions block. The select block is an
array which defines the content and layout of the result. The conditions describe a set of tests on nodes
and their properties. The result will contain information for all elements on which all conditions passed
(implicit AND relation between condition array elements)
The name of the property to check. If the property is a structure the sub-elements can be accessed with ".". If no condition is set, the node is selected if the property has a non-empty value.
The name of the property to check. If the property is a structure the sub-elements can be accessed with ".". If no condition is set, the node is selected if the property has a non-empty value.
An object that identifies one topological element. Topological elements can be faces edges or points.
The elementtype is identified by entityType which can be one of the following values:
1->face 2->edge 3->point Note: This key is only used for the select part of the query as it is resolved to its specialization when returned.
An array of arrays. For each successful condition match an array with the selected element values is returned. The order of values matches the select Specification.
Select
Result
select: ["nodeId", "metadata.auxAttributes"]
[[15, {...}], [42, {...}], ...]
Examples
Description
Query
Response
Aux nodes for a faceHandle excluding nodes of type Revision index
With the Query API you can access additional information about nodes.
The query object is a JSON object which contains a select and a conditions block. The select block is an array which defines the content and layout of the result. The conditions describe a set of tests on nodes and their properties. The result will contain information for all elements on which all conditions passed (implicit AND relation between condition array elements)
, <selectkey.value> ]:, :}]
{
select: [
conditions: [{
}
Logical keys can be put inside conditions instead of a select or condition key in order to express the corresponding logical operation.
An array of arrays. For each successful condition match an array with the selected element values is returned. The order of values matches the select Specification.
const queryLabels = await context.query({ select: ['nodeId', 'label'], conditions: [{ nodeType: 'aux' }, { metadata: 'auxProperties.pmiType', equals: 'ModelView' }] }); const queryPMIType = await context.query({ select: ['nodeId', 'auxProperties.pmiType'], conditions: [{ nodeType: 'aux' }, { metadata: 'auxProperties.pmiType', equals: 'ModelView' }] });