pcb-rnd knowledge pool

 

The object property editor

propedit by Tibor 'Igor2' Palinkas on 2016-09-25

Tags: howto, ui, gui, property, attribute, object, edit, change, menufile

node source

 

 

Abstract: Interactive GUI and command line function to change properties and attributes of one or more selected object(s).

 

Since 1.1.2, pcb-rnd core is able to attach user defined attributes (arbitrary textual key=value pairs) to any object. The original mainline pcb-rnd was forked from already supported attributes on some objects (e.g. board attributes, net attributes) but not on all. However, the user had very little access to the attributes - no GUI or action would handle them.

The property editor operates on selected objects (e.g. when invoked with keys {e p}) or the object under the cursor (e.g. when invoked from the right click context menu). The underlying action is called "propedit".

Propedit introduces a property editor window that is able to edit attributes and core properties of drawing primitives, layers, layer groups, boards. Core properties include all hardwired properties of objects, such as geometry (e.g. trace width, hole diameter, clearance) or textual data (e.g. string of a text).

[screenshot of Edit Properties menu]

Properties and attributes of the selected objects are collected in a sorted tree - each row is a property (under the p/ subtree) or an attribute (under the a/ subtree). For each row all values seen in the selection are also collected so that the following values can be presented on the list, per row:

When the user clicks on a row, an edit box is activated and the value can be changed. A combo box lists all existing values for the given row, so it is easy to unify the value of a property or attribute among all selected objects to one of the existing values, but the user is also free to enter a new value.

It is also possible to remove existing attributes or to add new attributes.

Values entered are entered in a widget appropriate to the data type for the selected field: for distances, values may be suffixed with a unit. If the value starts with + or -, it is interpreted as a relative value; e.g. a -1mm for clearance means "decrease the current clearance value by 1mm". There are a few fields where negative values are acceptable, e.g. arc angles; to enforce a negative value (e.g. -90) to overwrite the angle instead of decreasing it by 90, the # prefix should be used (i.e. #-90).