Command for outputting objects (frames, symbols, forms, instances) in an external window.
The EPLAN.EPLAN21.OUTPUT_ON command is called up via the API functions as specified in the EPLAN 21 API.
All parameters have the prefix "EPL_PARAM_OUTPUT_ON_".
Type | Description | |
---|---|---|
PAGE | [IN] EplHandle |
Handle of the page which is to be output into a window. |
FRAME | [IN] EplHandle |
Handle of the frame which is to be output into a window. |
FORM | [IN] EplHandle |
Handle of the object which is to be output into a window. |
INSTANCE | [IN] EplHandle |
Handle of the instance which is to be output into a window. |
SYMBOL | [IN] EplHandle |
Handle of the symbol which is to be output into a window. |
SYMBOL_VARIANT | [IN] Integer |
One of the valid symbol variants. |
WINDOW | [IN] Integer |
Handle of the window where the object is to be output.
NULL: (default) |
DEVICE_CONTEXT | [IN] Integer |
Device-context-handle where the object is to be output.
This parameter is only used if the parameter is EPL_PARAM_OUTPUT_ON_WINDOW == NULL. NULL: (default) |
WIDTH | [IN, OPTIONAL] Integer |
Width of the device context on which is output.
This parameter is only taken into account if the DEVICE_CONTEXT parameter is used. |
HEIGHT | [IN, OPTIONAL] Integer |
Height of the device context on which is output.
This parameter is only taken into account if the DEVICE_CONTEXT parameter is used. |
COLOR_SCHEME | [IN, OPTIONAL] Integer |
Color scheme used for outputting the object. The following values are valid:
|
The eplExecuteCommand function returns EPL_OK if the objects could be successfully output.
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_FAILED | The export could not be carried out. A fatal error occurred. |
EPL_ERR_INVALID_ARGUMENT | No suitable parameter (PAGE, FRAME, FORM, INSTANCE, SYMBOL) was transferred. |
EPL_ERR_NO_OUTPUT_WINDOW | A handle of the output window was not transferred. |
The following example shows a function which outputs a page in a window. The handle of the page object and the window handle must be determined first.
bool outputPage(EplSession hSession, EplHandle hPage, HWND hWindow) { EplBoolean bRet(eplFALSE); //Create command EplHandle hCmdOutputOn = eplCreateCommand(hSession, L"EPLAN.EPLAN21.OUTPUT_ON"); if(hCmdOutputOn != EPL_ERROR) { //Set parameters // //Page handle eplSetHandleParam(hSession, hCmdOutputOn, EPL_PARAM_OUTPUT_ON_PAGE, hPage, 0); const BUFLEN = 100; wchar_t buf[BUFLEN]; _itow((int)hWindow,buf,10); //Determine window handle eplSetParam(hSession, hCmdOutputOn, EPL_PARAM_OUTPUT_ON_WINDOW, buf, 0); //Execute command if(eplExecuteCommand(hSession, hCmdOutputOn) != EPL_ERROR; { bRet = eplTRUE; } eplCloseObject(hSession, hCmdOutputOn); } return bRet; } |