API Help
Eplan.EplApi.ApplicationFramework Namespace / UserRights Class / AddRight Method
right name string
category name 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, you find in the StringCollection returned by GetCategory.

In This Topic
    AddRight Method
    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

    strRightname
    right name string
    strCategory
    category name 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, you find in the StringCollection returned by GetCategory.

    Return Value

    true, in case the new right was successfully added to the rights management database.
    Exceptions
    ExceptionDescription
    Thrown when logged-in user has not enough right to work on user rights.
    Thrown when given right strRightname already exist.
    Thrown when 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 file "$(EPLAN_DATA)\\Administration\\customrights.erm". The system administrator needs to protect this file from changes by unauthorized persons.
    See Also