ITcPlcOpenImportExport::PlcOpenImport
Imports PLCopen XML. options (= PLCIMPORTOPTIONS) controls how conflicts are handled. With NONE, a conflict results in an error. Optional selection; the folder structure may remain unchanged.
Signature
HRESULT PlcOpenImport([in] BSTR bstrFile, [in, defaultvalue(0)] int options, [in, defaultvalue(L"")] BSTR bstrSelection, [in, defaultvalue(-1)] VARIANT_BOOL bSubTree);
Parameter
|
Name |
Type |
Description |
|---|---|---|
|
bstrFile |
BSTR |
[in] Source file (PLCopen XML). |
|
options |
int |
[in, defaultvalue(0)] Conflict handling; see PLCIMPORTOPTIONS. |
|
bstrSelection |
BSTR |
[in, defaultvalue("")] Item selection, separated by |
|
bSubTree |
VARIANT_BOOL |
[in, defaultvalue(-1)] |
Return value
|
Name |
Type |
Description |
|---|---|---|
|
(HRESULT) |
HRESULT |
|
Error codes
-
DanglingAdapterException: Adapter not connected. -
ArgumentNullException("bstrFile"):bstrFileis null. -
ArgumentException:bstrFileis empty or the file is missing. -
PlcOpenXmlException: Selection cannot be set; conflict witherrorOnConflictor empty content *(Interop mapping)*.