Eplan Platform API
Eplan.EplApi.DataModel Namespace / UserDefinedPropertyDefinition Class / Create Method / Create(Project,String,ClientType[],PropertyType) Method
Project to which definition will be assigned.
Identifying name of the property.
Possible usages of user-defined property definition.
Type of property. There are five accepted types: MultiLangString, String, Bool, Double and Long.

In This Topic
    Create(Project,String,ClientType[],PropertyType) Method
    In This Topic
    Creates new property definition.
    Syntax

    Parameters

    pProject
    Project to which definition will be assigned.
    strName
    Identifying name of the property.
    nClients
    Possible usages of user-defined property definition.
    pType
    Type of property. There are five accepted types: MultiLangString, String, Bool, Double and Long.

    Return Value

    Returns an object which represents new property definition or null if property definition can't be created.
    Exceptions
    ExceptionDescription
    Thrown when parameter is null.
    Thrown when identifying name is empty or when for parameter pType other value is passed than one from accepted ones.
    Thrown when property definition with this name already exists in the project.
    Thrown when identifying name is invalid.
    Thrown when project can't be locked in exclusive mode.
    Remarks
    The identifying name for the property must be unique. We recommend that you start the name with your company code. It may contain upper-case and lower-case letters, numbers and the special characters ".-_&". A number can't be at the beginning of the name. At least one point must be used in the name; however, the point must not be at the beginning or end of the name. The string "EPLAN" at the beginning is not permitted either. Points within the name are treated as substructures and create a sub-level in the tree. For pType parameter there are five accepted types: MultiLangString, String, Bool, Double and Long.
    See Also