Eplan Platform API
Eplan.EplApi.DataModel Namespace / PropertyValue Class / ToString Method / ToString(Language,String) Method
Language to extract from MultiLangString value.
Default value to be retuned if property cannot be read.

In This Topic
    ToString(Language,String) Method
    In This Topic

    Used in conversion of the PropertyValue object to MultiLangString.

    If the type of property is MultiLangString, only the specified language is returned. In case of a transient PropertyValue object, the stored value is returned without any cast.

    Syntax

    Parameters

    Parameter NameDescription
    languageLanguage to extract from MultiLangString value.
    default_valueDefault value to be retuned if property cannot be read.

    Return Value

    Returns the string value of the PropertyValue object or the default_value if the property cannot be read from the object or the properties list.
    Exceptions
    ExceptionDescription
    Thrown if the source is indexed, but the destination is an unindexed property.
    Thrown if the source is not an indexed property, but the destination is indexed.
    Remarks
    If the property cannot be read, the given default_value is returned instead of throwing an EmptyPropertyException.
    See Also