Command for creating an interruption-point list.
The EPLAN.EPLAN21.INTERRUPTIONPOINT.CREATE command is called up via the API functions as specified in the EPLAN 21 API.
All parameters have the prefix "EPL_PARAM_PROJECTDATA_CREATE_"!
ParameterID | Type | Description |
---|---|---|
PROJECT | [IN] EplHandle |
Handle of the project/macro in which the interruption-point list is to be generated. |
NAME | [IN] String |
Name of the new interruption-point list. |
INTERRUPTIONPOINT_MODE | [IN] String |
The type of the new interruption-point list is determined by means of this parameter:
|
RESULT | [OUT] EplHandle |
After the command was successfully executed, this parameter can be used to query the handle of the generated interruption-point list. |
The eplExecuteCommand function returns EPL_OK if the interruption-point list could be created 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 is not allowed to modify the project. |
EPL_ERR_FAILED | The object could not be created. |
EPL_ERR_INVALID_ARGUMENT | The parameter PROJECT was invalid. |
EPL_ERR_PROJECTDATA_NAME_NOT_UNIQUE | The name was not unique or an object with this name was already existing. |
The following example shows a function which creates an interruption-point list.
EplHandle createIP(EplSession session, EplHandle hProject, const wchar_t *sName) { EplHandle hRet(EPL_ERROR); //Create command EplHandle hCmd = eplCreateCommand(session, L"EPLAN.EPLAN21.INTERRUPTIONPOINT.CREATE"); if(hCmd != EPL_ERROR) { eplSetHandleParam(session, hCmd, EPL_PARAM_PROJECTDATA_CREATE_PROJECT, hProject, 0); eplSetHandleParam(session, hCmd, EPL_PARAM_PROJECTDATA_CREATE_NAME, sName, 0); // Generate interruption point in pair mode eplSetHandleParam(session, hCmd, EPL_PARAM_PROJECTDATA_CREATE_INTERRUPTIONPOINT_MODE, "0", 0); //Execute command if(eplExecuteCommand(session, hCmd) == EPL_OK) { // Query result: hRet = eplGetHandleParam(session, hCmd, EPL_PARAM_PROJECTDATA_CREATE_RESULT, 0); if(hRet != EPL_ERROR) hRet = eplCloneHandle(session, hCmd); } eplCloseObject(session, hCmd); } return hRet; } |