Number (Named Data Type)

From wiki.fine.cz
Jump to navigation Jump to search

Used to store a numeric value (with a decimal point or an integer). It can also contain a text string.

Template XML definition

Common Properties

Property Template XML Description Presence Default
Settings [E] Settings required
    Symbol     [A] STRING Symbol Formatted text to be used for input and output in the format "Name Symbol = Value [Unit]" optional (empty)
    Unit type     [A] ENUM UnitType Unit type (e. g. Length) required
    Unit description

    (Unit type Undefined)

    [A] STRING UnitNameMetric

    [A] STRING UnitNameImperial

Unit description (formatted text) (separately Metric and Imperial) - used according to the current Unit System when entering and outputting in the format Symbol = Value [Unit] optional (empty)
    Unit definition

    (other unit types)

    [A] STRING UnitDefMetric

    [A] STRING UnitDefImperial

Definition of the unit with respect to its Unit type (separately Metric and Imperial) (e.g. for the Length type it can be m, cm, mm, ft, ...) - see Units required for current

unit system

    Number of decimal places     [A] INT DecimalDigitsMetric

    [A] INT DecimalDigitsImperial

The number of decimal places, if Exponent, then the number of valid digits is the number of decimal places increased by one (separately Metric and Imperial). Range from 0 to 9. required for current

unit system

    Exponent     [A] BOOL ExponentMetric

    [A] BOOL ExponentImperial

The exponential format number eg 1.234E + 06 is used (separately Metric and Imperial). Maximal number of characters in fix format is 15, if exceeded, exponential format is used in form E12 (for fix format with 3 decimal places 3 is limit 12345678912.123 for positive value and -1234567891.123 for negative value). required for current

unit system

    Allow string input     [A] BOOL AllowString Alternative text can be entered instead of number, e. g. (not entered) optional false
    Empty text     [A] STRING EmptyText Formatted text to show in input field if the user does not enter his own optional (empty)
Range [E] Range optional
    Minimal value     [A] STRING / DOUBLE MinValueMetric

    [A] STRING / DOUBLE MinValueImperial

Minimal value user can enter, either number or special value MinLimit, which equals to -1.0E+99 optional MinLimit
    Minimal value included     [A] BOOL MinValueIncluded Specifies if minimal value can be entered or not optional false
    Maximal value     [A] STRING / DOUBLE MaxValueMetric

    [A] STRING / DOUBLE MaxValueImperial

Maximal value user can enter, either number or special value MaxLimit, which equals to +1.0E+99 optional MaxLimit
    Maximal value included     [A] BOOL MaxValueIncluded Specifies if maximal value can be entered or not optional false
    AllowNAN     [A] BOOL AllowNAN User is allowed to keep input empty optional true
    AllowZero     [A] BOOL AllowZero Special value 0.0 is allowed, has sense only if 0.0 is contained in range Min-Max optional true
  • When data entering and output the format Symbol = Value [Unit] is used according to the current unit system
  • If the unit type is other than Undefined, values are recalculated when changing the unit system

Example of Template XML

<Settings UnitType="Undefined" UnitNameMetric="sss" UnitNameImperial="ss2" DecimalDigitsMetric="3" ExponentMetric="false" DecimalDigitsImperial="3" ExponentImperial="false" />

<Settings UnitType="1/ΔTemp" UnitDefMetric="DegCelsius" UnitDefImperial="DegCelsius" DecimalDigitsMetric="3" ExponentMetric="false" DecimalDigitsImperial="3" ExponentImperial="false" />

<Settings UnitType="Force*Length/Angle/Length" UnitDefMetric="kN|m|rad|m" UnitDefImperial="kip|in|rad|in" DecimalDigitsMetric="3" ExponentMetric="false" DecimalDigitsImperial="3" ExponentImperial="false" />

Data XML definition

Common Properties

Property XML Description
Value [A] STRING DblValue Contains float or string value.
Unit [A] STRING Unit Contains unit definition

Example of Data XML

<Item ID="{DC2B5705-A262-40B8-B91D-0BF3B7D8B80C}" DblValue="1,000" Unit="Undefined_sss" />

<Item ID="{6776BF97-1490-4A2B-A1E7-46B4A40ACD8D}" DblValue="nan" Unit="1/ΔTemp_DegCelsius" />

<Item ID="{E99E7D72-DA4D-47CE-AAE2-823F6B2D5C81}" DblValue="5,000E+00" Unit="Force_kN*Length_m/Angle_rad/Length_m" />