ITcModuleInstance::ImportXml
For module instances, <TcModuleInstance> is imported along with modules, data types, and optional translations; <TcModuleRefactorInfo> is processed; and, if necessary, a suitable runtime app class is searched for from a <TcModuleClass> node. For process images, the import is rejected because the element type is invalid. For fieldbus boxes, importing is supported only for certain terminals and requires a direct <Module> node under <TcModuleInstance>—that is, not the same nesting structure that the export generates.
Signature
HRESULT ImportXml(BSTR bstrXML);
Parameter
Name | Type | Description |
|---|---|---|
bstrXML | BSTR | [in] XML to be imported. |
Return value
Name | Type | Description |
|---|---|---|
(HRESULT) | HRESULT |
|
Error codes
-
TSM_E_ITEMDELETED: The referenced Tree Item is no longer valid. -
TSM_E_XMLERROR: The XML does not contain any supported module or class nodes. -
TSM_E_INVALIDITEMTYPE: Importing is not supported for this element type.