Command for degrouping several groups or instances.
The EPLAN.EPLAN21.GROUP.DEGROUP command only degroups to one lower level, the EPLAN.EPLAN21.GROUP.DEEPDEGROUP command degroups the groups or instances completely.
The EPLAN.EPLAN21.GROUP.DEGROUP command as well as the EPLAN.EPLAN21.GROUP.DEEPDEGROUP command are called up via the API functions as specified in the EPLAN 21 API.
All parameters have the prefix "EPL_PARAM_DEGROUP_"!
ParameterID | Type | Description |
---|---|---|
GROUPS | [IN, OPTIONAL] EplHandle |
Handle to the iterator for the groups which are to be degrouped. Cannot be used in combination with the EPL_PARAM_DEGROUP_INSTANCES parameter. |
INSTANCES | [IN, OPTIONAL] EplHandle |
Handle to the iterator for the instances that are to be degrouped. Cannot be used in combination with the EPL_PARAM_DEGROUP_GROUPS parameter. |
PAGE | [IN] EplHandle |
Handle to the page on which the groups or instances are located. |
The eplExecuteCommand function returns EPL_OK if the groups could be degrouped 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 page. |
EPL_ERR_FAILED | Degrouping failed. |
EPL_ERR_INVALID_ARGUMENT | One parameter was invalid. |
The following example shows a function that uses this command.
EplHandle deGroup(EplSession hSession, EplHandle hPage, EplHandle hGroupIter) { EplHandle hRet(EPL_ERROR); EplHandle hCmd = eplCreateCommand(hSession, L"EPLAN.EPLAN21.GROUP.DEGROUP"); if(hCmd != EPL_ERROR) { eplSetHandleParam(hSession, hCmd, EPL_PARAM_GROUP_DEGROUP_PAGE, hPage, 0); eplSetHandleParam(hSession, hCmd, EPL_PARAM_GROUP_DEGROUP_GROUPS, hGroupIter, 0); hRet = eplExecuteCommand(hSession, hCmd); eplCloseObject(hSession, hCmd); } return hRet; } |