Search Results for

    Show / Hide Table of Contents

    Interface IUnits

    Gives access to units.

    Namespace: TopSolid.Kernel.Automating
    Assembly: cs.temp.dll.dll
    Syntax
    [AvailableSinceVersion(7, 6, 0, 0)]
    public interface IUnits
    Remarks

    This interface is available since v7.6.

    Methods

    ConvertFromSI(UnitType, Int32, Double)

    Converts a value from SI unit to a specified unit.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    double ConvertFromSI(UnitType inUnitType, int inUnitIndex, double inValue)
    Parameters
    Type Name Description
    UnitType inUnitType

    Unit type.

    System.Int32 inUnitIndex

    Unit index.

    System.Double inValue

    Value in SI to convert into the specified unit.

    Returns
    Type Description
    System.Double

    Converted value.

    Remarks

    This method is available since v7.6.

    ConvertToSI(UnitType, Int32, Double)

    Converts a value from a specified unit to SI unit.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    double ConvertToSI(UnitType inUnitType, int inUnitIndex, double inValue)
    Parameters
    Type Name Description
    UnitType inUnitType

    Unit type.

    System.Int32 inUnitIndex

    Unit index.

    System.Double inValue

    Value in the specified unit to convert into SI unit.

    Returns
    Type Description
    System.Double

    Converted value.

    Remarks

    This method is available since v7.6.

    GetUnitCount(UnitType)

    Gets the number of units of a specified type.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    int GetUnitCount(UnitType inUnitType)
    Parameters
    Type Name Description
    UnitType inUnitType

    Unit type.

    Returns
    Type Description
    System.Int32

    Number of available units.

    Remarks

    The indexes of the available units go from 0 to Count-1.

    This method is available since v7.6.

    GetUnitSymbol(UnitType, Int32)

    Gets the symbol of a unit in English.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    string GetUnitSymbol(UnitType inUnitType, int inUnitIndex)
    Parameters
    Type Name Description
    UnitType inUnitType

    Unit type.

    System.Int32 inUnitIndex

    Unit index.

    Returns
    Type Description
    System.String

    Symbol of the unit in English.

    Remarks

    This method is available since v7.6.

    SearchUnit(UnitType, String)

    Searches for a unit of a specified type and symbol.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    int SearchUnit(UnitType inUnitType, string inSymbol)
    Parameters
    Type Name Description
    UnitType inUnitType

    Unit type.

    System.String inSymbol

    Unit symbol in English.

    Returns
    Type Description
    System.Int32

    Index of the unit found or -1 if not found.

    Remarks

    This method is available since v7.6.

    In This Article
    • Mentions légales
    • C.G.U
    • Données personnelles

    Copyright © 2024 TopSolid Tous droits réservés