-
Notifications
You must be signed in to change notification settings - Fork 1
SubTree_PropValues
MetaScript functions SubTree_PropValues
- SubTree_PropValues(item, property)
- SubTree_PropValues(item, attribute)
- SubTree_PropValues(item, property) results in a new uint32 domain unit with a string attribute containing the property values of the subitems of the item argument. The name of this attribute is the name of the property.
- SubTree_PropValues(item, attribute) results in a new uint32 domain unit with a set of string attributes containing multiple property values of the subitems of the item argument . The names of the resulting attributes are the names of the propertys.
- argument item can be any tree item.
- argument property needs to be a valid property name, the list of all properties can be found here.
- argument attribute needs to a string data item.
7.103
1.
container
PropValueSource
{
parameter
label : ['ABC'];
parameter
sumNrInhabitants (ADomain): [2,5,3,2,0];
unit
domainA: nrofrows = 9;
unit
valuesB:= baseunit('b',float64);
container
sublevel
{
attribute
meanNrInhabitants(PropValueSource): [1,2,1,1,0];
}
}
unit
name :=
SubTree_PropValues
(PropValueSource,'name');
unit
expr :=
SubTree_PropValues
(PropValueSource,'Expr');
2.
unit
property : nrofrows = 2
{
parameter
name: ['name','expr'];
}
unit
name_and_expr :=
SubTree_PropValues
(PropValueSource, property/name);
name |
label |
sumNrInhabitants |
domainA |
valuesB |
sublevel |
meanNrInhabitants |
domain name, nr of rows = 6
expr |
baseunit('b',float64) |
domain expr, nr of rows = 6
name | expr |
label | |
sumNrInhabitants | |
domainA | |
valuesB | baseunit('b',float64) |
sublevel | |
meanNrInhabitants |
domain name_and_expr, nr of rows = 6
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.