Harness proD API Help
EPLAN.Harness.API.ApiProperties Namespace / CurrentProperty Class
Members Example
In This Topic
    CurrentProperty Class
    In This Topic
    Property which stores current value with a unit.
    Object Model
    CurrentProperty ClassPropertyValue Class
    Inheritance Hierarchy

    System.Object
       EPLAN.Harness.API.ApiProperties.Property
          EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty
             EPLAN.Harness.API.ApiProperties.CurrentProperty

    Syntax
    Remarks

    Represents a property with current value.

    Class provides a method to convert values between units.

    Example
    The following example shows how to use the class CurrentProperty.
    CurrentProperty current = new CurrentProperty(16, Unit.Milliamper);
    Console.WriteLine(current);
    
    current.Convert(Unit.Amper);
    Console.WriteLine(current.ToString());
    
    current = "2,4 kA";
    Console.WriteLine(current);
    Console.WriteLine($"Value: {(double)current.Value}, Unit: {current.Unit}");
    
    // Results:
    // 16 mA
    // 0,016 A
    // 2,4 kA
    // Value: 2,4, Unit: Kiloamper
    Public Constructors
     NameDescription
    Public ConstructorOverloaded.   
    Top
    Public Properties
     NameDescription
    Public Property Specifies whether the property is interval. (Inherited from EPLAN.Harness.API.ApiProperties.Property)
    Public Property Unit of the value of this property. (Inherited from EPLAN.Harness.API.ApiProperties.Property)
    Public Property Gets the value of this property. (Inherited from EPLAN.Harness.API.ApiProperties.Property)
    Top
    Public Methods
     NameDescription
    Public Method Convert a property to the specified unit. (Inherited from EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty)
    Public MethodIs this unit class property equal to the following object? (Inherited from EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty)
    Public MethodServes as the default hash function. (Inherited from EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty)
    Public MethodOverloaded. Returns a string that represents the current object. (Inherited from EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty)
    Top
    Public Operators
    Sums two properties.
    Implicit conversion from System.String to CurrentProperty.
    Subtracts two properties.
    Top
    See Also