Example: Edit a point class
- Last UpdatedOct 02, 2024
- 1 minute read
A point class list in piconfig shows the following:
* (Ls - ) piconfig> @table piptcls
* (LS - PIPTCLS) piconfig> @mode list
* (Ls - PIPTCLS) piconfig> @ostru class
* (Ls - PIPTCLS) piconfig> @ostru set,...
* (Ls - PIPTCLS) piconfig> @select class=MyPtClass
* (Ls - PIPTCLS) piconfig> @ends
MyPtClass
base,classic
*----------
-
Add the attributes MyAttribute1 (string) and MyAttribute2 (int32) to this point class. To do this, create an attribute set, MyAttributeSet, as follows.
@table piatrset
@mode create
@istru set
@istru attrib,type,default
@istru ...
MyAttributeSet
MyAttribute1,string,my default string
MyAttribute2,int32,22 -
Check that the attribute was correctly created:
@table piatrset
@mode list
@ostru set
@ostru attrib,type,default
@ostru ...
@select set=MyAttributeSet
@endsYou should see:
MyAttributeSet
MyAttribute1,String,my default string
MyAttribute2,Int32,22
* End Repeat...
*---------- -
Edit MyPtClass to include this attribute set. The system must be in stand-alone mode. Enter at a command prompt:
piartool -sys -standalone on
-
In piconfig, define the attribute sets that should belong to the point class:
@table piptcls
@mode edit
@istru class
@istru set,...
MyPtClass
base,classic,MyAttributeSet -
Check that these attributes now form MyPtClass.
* (Ed - PIPTCLS) piconfig> @mode list
* (Ls - PIPTCLS) piconfig> @ostru class
* (Ls - PIPTCLS) piconfig> @ostru set,...
* (Ls - PIPTCLS) piconfig> @select class=MyPtClass
* (Ls - PIPTCLS) piconfig> @endsYou should see:
MyPtClass
base,classic,MyAttributeSet
*---------- -
To see all attributes that are in this point class, enter:
@table pipoint
@ptclass MyPtClass
@?atr -
Place the system back in normal mode:
piartool -sys -standalone off