<< Click to Display Table of Contents >> Navigation: Concepts > Connect to XML from your programming language |
XML API is universal. It can be used in different ways to carry out data exchange.
Dynamic Data Exchange (DDE) is the protocol that allows exchanging data between applications. The DDE is supported by ABViewer. So, integration of the DDE support into a custom-developed application (app) will allow to interact with ABViewer. The following steps are required to carry out the DDE interaction with ABViewer:
1. ABViewer must be specified as a DDE client. The service and topic parameters for the client must be specified as "abviewer".
2. The connection must be established between the server (app) and the client (ABViewer)
3. The command execution by the client. ABViewer will automatically initialize the feedback connection (ABViewer server -> app client) when it is necessary. So, the app name as parameter ("appsender=app_name") must be provided within the command body.
Exchange data with COM (CADEditorX, CADViewX) objects is based on the use of a single function and a single event.
The ProcessXML function is used for processing of instructions. To process XML instructions call the ProcessXML method and input the XML document that contains XML data as a parameter.
Syntax:
Delphi C# VB.NET Public Function ProcessXML(aInput As String) As String C++ JScript |
Parameters
AInput |
The input XML API document. |
Return value
XML document that contains some output data.
The OnProcess event fires when the ProcessXML function has handled the provided instruction. This makes the event useful for parsing of the returned XML data.
Syntax (CADEditorX):
Delphi C# public delegate void ISgCADEditorEvents_OnProcessEventHandler(object ASender, AxCADEditorLib.ISgCADEditorEvents_OnProcessEvent e) VB.NET Public Event OnProcess(ByVal aSender As Object, ByVal e As AxCADEditorLib.ISgCADEditorEvents_OnProcessEvent) C++/ATL JScript |
Parameters
ASender |
Control providing the data. |
AXML |
The XML document containing the output data. |
Go to CADEditorX