System.Object
Eplan.EplApi.Base.UnitParser
System.Object
Eplan.EplApi.Base.UnitParser
UnitParser oUnitParser = new UnitParser(); ParserParameter oParserParameter = new ParserParameter(); oParserParameter.UnitID = Unit.Length_cm; //Set value in cm oUnitParser.Set("200 cm", oParserParameter); //Get value in mm ParserParameter oParserParameter_mm = new ParserParameter(); oParserParameter_mm.UnitID = Unit.Length_mm; double dValue_mm = oUnitParser.ValueToUnit(oParserParameter_mm); //Get value in m ParserParameter oParserParameter_m = new ParserParameter(); oParserParameter_m.UnitID = Unit.Length_m; double dValue_m = oUnitParser.ValueToUnit(oParserParameter_m);
Name | Description | |
---|---|---|
UnitParser Constructor | The Constructor |
Name | Description | |
---|---|---|
Dispose | Destructor for deterministic finalization of UnitParser object. | |
GetBaseUnit | Get the base unit of the parsed result of this unit group. | |
GetBaseValue | Get the value of the parsed result in the base unit of this unit group. | |
GetUnit | Get the unit of the parsed result. | |
GetValue | Get the value of the parsed result. | |
Set | Overloaded. The start of any parse. Set the number and the unit to parse and fill the unit of this text in the parser parameters. | |
ToDisplay | Convert the value to a new unit (of parameterForConversion) of this group and make a display string out of it. | |
ValueToUnit | Convert the value to a new unit (of parameterForConversion) of this group. |