EPLAN.EPLAN21.LICENSE

Contents

Description

Command to carry out the licensing. This command is the first command to be called up after the initialization function eplInitialize. It is only possible to use the functionality of the API after this command has been executed successfully.

The EPLAN.EPLAN21.LICENSE command is called up via the API functions as specified in the EPLAN 21 API.

Parameters

All parameters have the prefix "EPL_PARAM_LICENSE_"!

ParameterID Type Description
USERNAME [IN]
String
User name of the designer license.
USERNUMBER [IN]
String

User number of the designer license.

Error Messages

The eplExecuteCommand function returns EPL_OK if licensing could be carried out successfully.

If the command fails, eplExecuteCommand returns the value EPL_ERROR. In this case, the error log can contain the following errors:

ErrorID Description
EPL_ERR_NO_RIGHT The current user group does not allow the user to create a database.

Example

The following code section shows how the licensing is to be carried out.

    EplHandle hSession;

    hSession = eplCreateSession();

    // ...
    
   EplHandle hcmdLicense = eplCreateCommand(hSession, L"EPLAN.EPLAN21.LICENSE");

    //Enter your license name here.
    eplSetParam(hSession, hcmdLicense, EPL_PARAM_LICENSE_USERNAME, L"NAME", 0);
    
    //Enter your license number here.
    eplSetParam(hSession, hcmdLicense, EPL_PARAM_LICENSE_USERNUMBER, L"NUMMER", 0);

    if( eplExecuteCommand(hSession, hcmdLicense) != EPL_ERROR)
    {
        //Further commands...
    }
    else
    {
        //Error handling...
    }

    ...

Reference