Command for writing back the results of the comparison of revisions.
The EPLAN.EPLAN21.REVISION.WRITE_BACK command is called up via the API functions as specified in the EPLAN 21 API.
All parameters have the prefix "EPL_PARAM_REVISION_WRITEBACK_"!
ParameterID | Type | Description |
---|---|---|
PROJECT | [IN] Handle |
Handle of the target project. |
DBNAME | [IN, OPTIONAL] String |
Name of the database containing the results of the revision comparison. If no parameter is indicated the database which was used last is taken. |
MACRONAME | [IN, OPTIONAL] String |
Name of the macro for marking modified instances. If this parameter is specified and multiple databases are used, the parameter MACRO_DATABASE_NAME should also be specified. If no parameter is indicated the macro which was used last is taken. |
MACRO_DATABASE_NAME | [IN, OPTIONAL] String |
Name of the project database where the revision macro
for marking modified instances can be found (MACRONAME).
If the parameter MACRONAME is specified and this parameter
is left empty, the command searches all databases for MACRONAME and uses the first macro found. If no parameter is indicated the macro which was used last is taken. |
USE_DBMACRO | [IN, OPTIONAL] Flag |
Flag: "0": The macro must be a file macro. MACRO_DATABASE_NAME and MACRO are ignored. "1": The macro must be a database macro. Parameters MACRO or MACRONAME and MACRO_DATABASE_NAME must be specified. If no parameter is indicated the setting which was used last is taken. |
MACRO | [IN, OPTIONAL] Handle |
Handle of the macro for marking modified instances.
If this parameter is used, the parameters USE_DBMACRO, MACRONAME and If no parameter is indicated the macro which was used last is taken. |
MARKER_VALUE | [IN, OPTIONAL] String |
Contents of the property for the revision marking. If no parameter is indicated the name of the revision is used. |
The eplExecuteCommand function returns EPL_OK if the revision markings were successfully entered into the project.
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_REVISION_PROJECT_READONLY | The project is write-protected. |
EPL_ERR_REVISION_INVALID_DATABASE | The database containing the comparison results could not be found or opened. |
EPL_ERR_REVISION_NOT_ALL_PAGES_FOUND | One or more pages of the comparison results could not be found in the project. |
EPL_ERR_REVISION_NOT_ALL_DEVICES_FOUND | One or more devices of the comparison results could not be found in the project. |
EPL_ERR_REVISION_MACRO_NOT_FOUND | The macro was not found in the macro database. |
EPL_ERR_REVISION_PLACE_MARCO_FAILURE |
When placing the macro an error has occurred. Note: Maybe the file macro was not found. |
The following example shows a function which inserts the revision markings in a project.
EplHandle WriteBack(EplSession s, EplHandle hProject, wchar *dbName, wchar *macroName) { EplHandle hRet(EPL_ERROR); EplHandle hCmd = eplCreateCommand(s, L"EPLAN.EPLAN21.REVISION.WRITE_BACK"); if(hCmd != EPL_ERROR) { //Set parameters // // Project handle eplSetHandleParam(s, hCmd, EPL_PARAM_REVISION_WRITEBACK_PROJECT, hProject, 0); //Name of database: eplSetParam(s, hCmd, EPL_PARAM_REVISION_WRITEBACK_DBNAME, dbName, 0); //Name of macro eplSetParam(s, hCmd, EPL_PARAM_REVISION_WRITEBACK_MACRONAME, macroName, 0); //Macro from the macro database eplSetParam(s, hCmd, EPL_PARAM_REVISION_WRITEBACK_USE_DBMACRO, L"1", 0); //Contents of revision markers eplSetParam(s, hCmd, EPL_PARAM_REVISION_WRITEBACK_MARKER_VALUE, L"REVISION", 0); //Execute command hRet = eplExecuteCommand(s, hCmd); //Close object eplCloseObject(s, hCmd); } return hRet; } |