Learn how to build a rule in the graphical Automation rule editor by combining a filter type, query methods, and actions.
Use the Automation rule editor to define automation logic for Quadri. Open the editor when you create a new rule or modify an existing rule. For the overall Automation workflow, see Automation. For more detailed information, see Guide: Automation Tool.
The Automation rule editor has three main areas:
- Left: the list of functions that you can drag into the diagram
- Center: the graphical area where you draw the rule
- Right: properties for the selected function

In the graphical area, four cursor tools control how you work with the diagram: 
- Pointer: the default cursor for selecting items
- Connect: draw a line between two functions. A green dot at the end of the line means the connection is valid
- Order: draw an order line when several rule sections share the same diagram
- Loop: connect a CSV Loop to an Object Query or Location Query so that the query can run once for each line in the file
A rule consists of a filter type, one or more query methods, and one or more actions.
At the bottom of the dialog:
- Validate: checks whether the diagram is a valid rule and reports errors if it is not
- OK: saves the rule and closes the dialog
- Cancel: closes the dialog without changing the rule
Build a rule
- Drag a filter type into the diagram: Object Query, Location Query, or CSV Loop.
- Object Query: find objects and run actions on them. The diagram shows an object result box.
- Location Query: find sections on a road or railway network and run actions on those sections. The diagram shows a location result box.
- CSV Loop: read input from a CSV or TXT file, and run an object query or location query for each line in the file. Use the loop cursor to connect the CSV loop box to the query box.
The rule always needs either an Object Query or a Location Query. If you drag in an Object Query, you get an object result box in the diagram. If you drag in a Location Query, you get a location result box in the diagram.
- Drag query methods that match the filter type, and connect them to the filter type box. The filter type box represents the query result.
- Drag one or more actions onto the result, and connect them.
- Click Validate to check the diagram, and then click OK to save the rule.
Do not mix location-query actions with object-query filters. If the result is an object result, use filters and actions from the object query menu.
You can keep a rule simple, or combine several query methods with logical operators and more than one action on the same result.
Query methods for object queries
After you add an object result, select object query methods on the left to filter which objects enter the result. Common methods include:
- Select all
- Select object type
- Object´s attribute comparison
- Name value comparison
- Attribute comparison
- Common attribute comparison
- Association comparison
- Object shape location
To combine filters, add logical methods from the menu on the left:
- AND: objects must match all connected criteria
- OR: objects must match at least one criterion
- NOT: reverses a single filter
Common actions
After you define the query, add one or more actions under the filters in the menu. Set action properties in the right panel. For some actions, click the three dots next to the action box to open a detailed dialog.
Modify Object
Use Modify Object to set or change attribute values on objects in the result. If you select Update to all object types, the action updates every object type that has those attributes. Select an object type such as StructureLayer when you need the list of available attributes for that type.
Map Attributes
Use Map Attributes to set a value on one attribute based on another attribute on the same object.
Map Object Type to Attribute
Use this action to write different attribute values depending on object type.
Object Validation
Use Object Validation to write messages to process info. You can set severity and insert object name or ID keywords into the message.
Set Attribute in Attribute type group independent of Object type
Use Set Attribute in Attribute type group independent of Object type to find an attribute type by its attribute type group and set values on objects in the result that define that attribute.
Set Classification Codes
Use Set Classification Codes to build a code from one or more input attributes and write it to a result attribute. If you select Update to all object types, the action applies to every object type that has the result attribute.
Numbering
Use Numbering to number objects in the result according to sorting criteria that you define in the dialog. For a worked example with manholes, see Use Case 01: Numbering Manholes.