exportval (Parametric)
The function is used to pass values from one object to another within a program.
When an object is called by another object, this function is used to access and potentially modify the values of variables in the "Export" object using the input values.
By using this function, the value of the specified parameter is taken and can be used in the calling object.
To understand the working logic of this function, see the following example:
Example:
<O N="exportvalAObject" T="Project" Category="Functions" TransAlignRule="1">
<!-- created by ParamML Examples on 13.02.2023 -->
<P N="AForce" V="100" Role="Input" />
<P N="BForce" V="50" Role="Input" />
<P N="CForce" V="333" Role="Input" />
<P N="DForce" V="888" Role="Input" />
<P N="EForce" V="40" Role="Input" />
<P N="FCompForce" V="AForce+BForce" />
<P N="GCompForce" V="BForce+CForce" />
<P N="HCompForce" V="DForce+EForce+CForce" />
<O T="Export">
<P N="BaseForce" V="100" />
</O>
</O> |
Debug Trace |
The exportvalAObject object is given above. Within this object, A-B-C-D-E Force parameters are user input. The object in question includes several input parameters, defined as the A-B-C-D-E Force parameters, which are provided by the user. The object also includes intermediate parameters, defined as the F-G-H CompForce, which are calculated using the user inputs. Additionally, there is a BaseForce parameter, which is a parameter stored within the export object and is used as part of the calculations. |
<O N="exportvalBObject" T="Project" Category="Functions" TransAlignRule="1">
<!-- created by ParamML Examples on 13.02.2023 -->
<O N="Calculation1" T="exportvalAObject">
<P N="AForce" V="70" />
<P N="BForce" V="30" />
<P N="CForce" V="3" />
<P N="DForce" V="8" />
<P N="EForce" V="40" />
<P N="BaseForce" V="100" />
</O>
<P N="expectedValue1" V="exportval(Calculation1.FCompForce)" />
<P N="expectedValue2" V="exportval(Calculation1.GCompForce)" />
<P N="expectedValue3" V="exportval(Calculation1.HCompForce)" />
<P N="total" V="expectedValue1+expectedValue2+expectedValue3" />
</O> |
Debug Trace |
Object B requires access to the parameters defined in object A. To accomplish this, object B utilizes the "exportval" parameter to perform calculations using the values stored in object A. This allows the user to perform necessary calculations with fewer steps and increased efficiency. By using the "exportval" parameter, object B can access and utilize the values stored in object A, streamlining the calculation process. |
To view this example in the library, see (exportvalAObject →OpenBrIM Platform , exportvalBObject → OpenBrIM Platform) |