Skip to content

SubTree_PropValues

mtbeek32 edited this page Jan 2, 2023 · 8 revisions

MetaScript functions SubTree_PropValues

syntax

  • SubTree_PropValues(item, property)
  • SubTree_PropValues(item, attribute)

definition

applies to

since version

7.103

example

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

see also

Clone this wiki locally