Chapter 11 - Modify Objects
The command Modify Objects enables to address various actions to a single or several object groups. The command is selectable from the global context menu when clicking into the white area of the CadnaA-main window.
The command is also available from the context menu of an individual object. When being selected from the context menu of a closed polygon the command refers to all objects inside, outside, or on the polygon border.
The actions may be applied to an individual objects as well upon a selection of a respective action from the object’s context menu.

Dialog Modify Objects
Actions
The following actions can also be performed for several objects or groups of objects:
- Delete
- Modify Attribute
- Copy Attributes
- Duplicate
- Force Rectangle
- Force Right Angles - Orthogonalize
- Snap Point to Facade
- Modify Order of Points
- Spline
- Simplify Geo
- Break into Pieces
- Connect Lines
- Transformation
- Convert to
- Generate Rails
- Generate Station
- Generate Building Evaluation
- Generate Label
- Generate Floors
- Parallel Object
- Activation
- Multiselect
- Change Object Tree assignment
- Swap Name / ID
- Delete Duplicates
- Fit DTM to Object
- Fit Object to DTM
- LUA Command
These actions may be restricted by one or more of the following methods (Range, Activation, Condition, Object Types) described on the following pages.
Range
Excluding objects geometrically
In case not all objects shall be affected by the action, you may draw a closed polygon around the objects to be modified (e.g. using a calculation area). In edit mode, click on the border of the closed polygon with the right mouse button and select the command Modify Objects from the context menu. In this case the closed polygon defines a geometric condition.
Objects inside, outside, on the border line of a polygon
By activating the respective check boxes, specify the location of the objects to be modified: inside, outside, or on the borderline of the polygon. All these options may apply simultaneously.
Note
Objects located on the border of the polygon or in case they reach to the inside or to the outside of the polygon, it may be useful to apply first the actions „Break Lines“ (see Break Lines) or „Break Areas“ (see Break Areas) from the polygon’s context menu to break the lines or areas at the intersection of the borderline.
Activation
Modifying all objects

In order to apply the command Modify Objects to all types of objects in your project file select the command Modify Objects from the context menu displayed when clicking with a right mouse button onto the white area of the CadnaA main window. While selecting „all“ the activation status of the objects concerned is irrelevant.
When selecting this command from the context menu of a single object this object will be excluded from the subsequent action.
Modifying activated, deactivated objects
These options enable to specify whether the action is applied to „activated“ or „deactivated“ objects only.
Modifying all objects in a group

Furthermore, the action may be restricted to all objects in a group (see Chapter 10 - Groups & Variants). Select the name of the pertinent group from the list box. All actions will be restricted to the objects of the specified group.
Condition
In addition, in order to restrict the selection of objects, a numerical condition or a string-based expression can be specified. For the specification of a condition all attributes of the object type selected are available. With a single object type selected, an attribute can be selected from the pop-up menu list (>>).

Attributes for Object „Point Source“ on in the pop-up menu
Note
The attribute description (in parentheses after the attribute name) in this and other lists can be suppressed. Locate the INI file (regarding its location, see Installing CadnaA) and enter in section [Main] the expression: DoAttrDescr = 0.
Numerical Condition
Expressions can be defined using numerical and logical operators (see Chapter 5 - Operators & Functions in the CadnaA manual „Attributes Variables, and Keywords“). The operation will be executed only if the condition is fulfilled (expression<> 0). Examples:
| Object Type | Condition | concerned are... |
| Building | HA>5 | buildings with a height larger than 5 m |
| Building | (HA>5)*(HA<20) | buildings with a height larger than 5 m and smaller than 20 m |
| Building | WG_NUM==1 or WG_NUM!=0 | residential buildings only (with option „Residential Building“ activated) |
| Building | WG_NUM!=1 or WG_NUM==0 | non-residential buildings only (with option „Residential Building“ deactivated) |
String Expression
In string expressions defining a condition, the usual attribute names are used, with a dollar sign appended and by enclosing the entire string in quotation marks (e.g. ID$=="aaa" in order to address the ID as a string and to check for "aaa" string). The following operators and commands are available:
| Operator/Command | Testing |
| == | strings match, upper/lowercase are relevant |
| != | strings do not match, upper/lowercase are relevant |
| <, <=, >= | uses ASCII values to order the strings |
| match(string,regex) | test string against a regular expression (for example: match(ID$, "ab*") addressing all objects with ID starting by "ab"), upper/lowercase relevant |
| match(XXX)==0 | test whether the string XXX is not used (no-match) |
| matchx(string, regex, ignore_case) | as with match, but with ignore_case!=0 upper/lowercase will not be ignored, e.g. matchx(ID$,“aaa“,0) addresses all objects with ID=“aaa“, but not those with ID=“aAa“ |
Object Types
Select a single or multiple object types to be concerned by the specified action using the mouse (Multiple Selection see Multiple Selections). To select all object types at once, click the button „All“. Clicking the button „None“ will deselect a specified selection.
When closing the dialog via the OK button, a subsequent dialog may be displayed, depending on the action chosen. Enter the appropriate parameters on this dialog. After confirmation by clicking OK, the selected action is applied to the respective objects. Instead, the action to cancel the action.
Example: Deleting a group of objects

The industrial enterprise in the above example, consisting of one building, point and line sources, is deleted using the context menu command Modify Objects.
- Draw a closed auxiliary polygon around the industrial enterprise.

- Select the auxiliary polygon using the right mouse button.
- From the context menu, select Modify Objects - the following dialog appears:

- On the Actions list box, select Delete.
- Activate the options „Inside Polygon“ and „On Border“.
- Select the object types „Point Source“, „Line Source“, „Building“ and „Aux.Polygon“ by clicking while pressing the CTRL key.
Note
In this example, however, you may also choose all objects by clicking the „All“ button.
- Confirm by OK.
In the dialog appearing next, you can either confirm or cancel the selected action.

- Click the „All“ button.
If the „All“ button is clicked, a selected action will be applied to all objects without the need for further confirmation, whereas the „Yes“ button requires explicit confirmation for each object.

The object on which the command Modify Objects is executed is excluded from this action - in this example the auxiliary polygon. If required delete this object using the DEL key.