Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
<O N="Unit_Object1" T="Project" Category="Core Objects">
    <!-- created by ParamML Examples on 27.01.2023 -->
    <O N="Internal" T="Unit" Length="Millimeter" Force="Newton" Angle="Radian" Temperature="Fahrenheit" />
    <O N="Geometry" T="Unit" Length="Meter" Force="Newton" Angle="Degree" Temperature="Fahrenheit" />
    <O N="Property" T="Unit" Length="Centimeter" Force="Newton" Angle="Degree" Temperature="Fahrenheit" />

Once three "Unit" objects have been created in the project as described above, we can assign a specific parameter to a created parameter by specifying its Unit Category (UC) and Unit Type (UT).

The Unit Category (UC) specifies the name that the parameter will be assigned to, while the Unit Type (UT) indicates what the parameter represents.

If the Unit Category (UC) matches the name of one of the "Unit" objects, the parameter will use the unit system that it matches.

Code Block
languagexml
<O N="Unit_Object1" T="Project" Category="Core Objects">
    <!-- created by ParamML Examples on 27.01.2023 -->
    <O N="Internal" T="Unit" Length="Millimeter" Force="Newton" Angle="Radian" Temperature="Fahrenheit" />
    <O N="Geometry" T="Unit" Length="Meter" Force="Newton" Angle="Degree" Temperature="Fahrenheit" />
    <O N="Property" T="Unit" Length="Centimeter" Force="Newton" Angle="Degree" Temperature="Fahrenheit" />
    <O N="Inputs" T="Group">
        <P N="A" V="-1000" Role="Input" Category="Inputs" UT="Length" UC="Property" />
        <P N="B" V="100" Role="Input" Category="Inputs" UT="Length" UC="Geometry" />
        <P N="C" V="50" Role="Input" Category="Inputs" UT="Angle" UC="Internal" />
    </O>
</O>

Parameter A will specify a length (UT) and its unit will be centimeters.


The B parameter will also specify a length (UT) and its unit will be meters.


The C parameter will also specify an angle (UT) and its unit will be radians.

To view this example in the library, see (https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&obj=objidaapg7ixwv54fcui4dieivp)

Example: