Editing a point's point class
- Last UpdatedOct 02, 2024
- 1 minute read
When you change a point's point class, any new attributes are added and set to default values. Attributes that do not belong to the new point class are removed. Existing attributes are copied if they are in the new point class. Compatible types retain their values and incompatible types are set to new default values.
When editing a point with piconfig, new attributes can be modified simultaneously. For example, you could edit the PtClassName attribute and include new attributes that only belong to the new point class and did not belong to the point's previous class. However, before you attempt this type of edit, you must set the target class.
To illustrate, try editing a point that belongs to Totalizer point class to Classic point class in piconfig as follows:
@table pipoint
@ptclass Totalizer
@mode edit
@istru tag,ptclassname,location4,pointsource
The following error is returned:
*piconfig Err> Unknown parameter <location4> in structure
*@istru tag,ptclassname,location4,pointsource
*piconfig Err> Complete Structure line removed
*@istru tag,ptclassname,location4,pointsource
This is because sets the environment for this edit to Totalizer point class, which does not have the location4 attribute. To edit the PtClassName attribute and new attributes unique to the target point class at the same time, set the environment to the target point class, Classic, by using first:
@ptclass classic
@istru tag,ptclassname,location4,pointsource
tagname,classic,1,C
If it is not necessary to edit the PtClassName attribute and new attributes at the same time, issuing:
@ptclass classic
because PtClassName is a built-in attribute and every point has this attribute.