Eplan Platform API
Eplan.EplApi.ApplicationFramework Namespace / UserRights Class / AddRight Method
Right name as a string
Category name as a string.
Only existing categories can be used. You can get the existing categories by the GetCategories method.
You need to set the complete category name that you can find in the StringCollection returned by GetCategory.

In This Topic
    AddRight Method (UserRights)
    In This Topic
    Adds the specified right entry to the given category of the custom UserRights file. The new right name will appear in the rights management dialog.
    Syntax

    Parameters

    Parameter NameDescription
    strRightnameRight name as a string
    strCategoryCategory name as a string.
    Only existing categories can be used. You can get the existing categories by the GetCategories method.
    You need to set the complete category name that you can find in the StringCollection returned by GetCategory.

    Return Value

    TRUE: The new right was successfully added to the rights management database. • FALSE: The new right could not be added to the rights management database.
    Exceptions
    ExceptionDescription
    Thrown when the logged-in user doesn't have the necessary right to work on the user rights.
    Thrown when the given right strRightname already exist.
    Thrown when the category strCategory does not exist.
    Remarks
    The currently logged-in user must have the URShowAdministrationDialog right, this is the right to work on user rights.
    The custom user rights will be saved to the "$(EPLAN_DATA)\\Administration\\customrights.erm" file. The system administrator needs to protect this file from changes by unauthorized persons.
    See Also