Returns the name of a parameter or attribute. By using NameOf() when passing arguments to functions that takes the name of a parameter or attribute the expressions become independent of renaming.
Overloads
string NameOf(Parameter parameter)
string NameOf(Attribute attribute)
parameter / attribute |
A direct reference to a parameter or attribute. |
Example
ChildrenParameterSum(NameOf(Length))
The function NameOf() returns the name of the double or integer parameter "Length" as argument to the function ChildrenParameterSum() which returns the child configurations' sum of the parameter.
Note: If the parameter Length is renamed e.g. LenghOfProduct the above expression will continue to work since it has a direct reference to the parameter and is independent of its name.
Remarks
Usage of NameOf() requires that the parameter or attribute is available in the current product, not only in for example the child products.