Search Results for

    Show / Hide Table of Contents

    Method GetParameterEnumValueNames

    GetParameterEnumValueNames(ParameterId, bool)

    Gets the enum value names corresponding to the given enum parameter.

    Declaration
    [OperationContract]
    [AvailableSinceVersion(7, 8, 0, 0)]
    List<string> GetParameterEnumValueNames(ParameterId inParameterId, bool inLocalized)
    Parameters
    Type Name Description
    ParameterId inParameterId

    Id of the parameter to analyze.

    bool inLocalized

    True if the names must be localized according to TopSolid user interface culture.

    Returns
    Type Description
    List<string>

    Enum value names corresponding to the enum type of the given parameter. The result is a list where each value of the enum is at its index in the list. For instance, an enum with 0,1,2 and 4 will return the list { zero, one, two, __, four }. Result[4] gives "four" !

    Remarks

    An integer parameter can hold a value taken from an enumeration. To know which values can be used, a user must be able to select this value in a Listbox or a combo. But if a combo filled with 0,1 and 2 is not very expressive. So use this function to get the localized text corresponding to 0,1 and 2 ! The list will use of course the enum type from the parameter. Some parameters exclude specific values not relevant in this particular use case. The list will not contain those forbidden values.

    In this article
    Back to top
    • Term of use
    • Corporate information
    • Privacy Policy - GDPR

    Copyright ©2025 TopSolid - All rights reserved.