EPLAN.EPLAN21.FORMGENDLG.REGENERATE

Contents

Description

This command opens the dialog for regenerating forms. According to the parameters chosen a form is updated, or a dialog is opened for selecting the forms to be updated.

For a description of the functionality provided in this dialog, please refer to the documentation of the command EPLAN.EPLAN21.FORMGEN.REGENERATE.

Parameters

The following parameters have the EPL_PARAM_COMMAND_ prefix.

ParameterID Type Description
PARENTWINDOW [IN]
HWND (integer)
Window handle of the dialog out of which the command is called up.

The following parameters have the EPL_PARAM_FORMGENDLG_REGENERATE_ prefix:

ParameterID Type Description
PROJECT [IN]
EplHandle
Handle to the project for which the form generator is to be started.
RUNID [IN, OPTIONAL]
Integer
When a report is made, a "RUNID" is assigned to the generated pages via the page property EPL_PROPERTY_PAGE_FORMGEN_RUNID. Using this ID the respective report can be updated with this command without the dialog for the selection of the reports to be updated being opened.

Error Messages

The eplExecuteCommand function returns EPL_OK if the dialog could be successfully opened.

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 open the dialog.
EPL_ERR_FAILED The dialog could not be opened.

Example

The following example shows a function that opens the dialog for the form generator. The instances generated by the form generator can be read from the returned iterator and can be used further on.

void
openFormRegenDlg(EplSession hSession, EplHandle hProject, EplHandle hPage)
{
       // Generate a command for starting the FormGen dialog:
       EplHandle hCmd = eplCreateCommand(hSession,
                                         L"EPLAN.EPLAN21.FORMGENDLG.REGENERATE");

       // Transfer the ParentWindow:
       HWND hwnd = getDlg()->getPeer();
       EplChar buf[20];
       _ltow((long)hwnd, buf, 10);
       eplSetParam(hSession,
                   hCmd,
                   EPL_PARAM_COMMAND_PARENTWINDOW,
                   buf,
                   0);

       eplSetHandleParam(hSession,
                         hCmd,
                         EPL_PARAM_FORMGENDLG_REGENERATE_PROJECT,
                         hProject,
                         0);

       buf[0] = L'\0';
       eplGetParam(s, hPage, EPL_PROPERTY_PAGE_FORMGEN_RUNID, buf, 0);
       eplSetParam(s, hCmd, EPL_PARAM_FORMGENDLG_REGENERATE_RUNID, buf, 0);

       eplExecuteCommand(s, hCmd);
       eplCloseObject(s, hCmd);
}

Reference