What is the purpose of OleAutoObj, oleMethod?

Hi, I am new to the DXL and I am wondering what is the purpose of the OleAutoObj. I saw examples like

OleAutoObj oleDomDocument = oleCreateAutoObject("MSXML.DOMDocument")

or

OleAutoObj objExcel = oleCreateAutoObject("Excel.Application")

Is it something like container for objects or have other pourpose. And I saw that is often use with OleAutoArgs, oleMethod but in the DXL manual does not have much for these.

And are these paramters "MSXML.DOMDocument", "Excel.Application" OS dependent?


Dinio - Tue Dec 08 16:06:09 EST 2015

Re: What is the purpose of OleAutoObj, oleMethod?
morast - Wed Dec 09 07:41:22 EST 2015

You can use DXL to control other WIndows applications provided they have an OLE interface. 

 

In the DXL manual information is collected under the section "Automation client support". 

Googling on "OLE Automation" can provide more information. I guess Wikipedia will have an introduction omn the subject.

 

DXL Excel exports and imports van be found that provide good examples.  

Re: What is the purpose of OleAutoObj, oleMethod?
Dinio - Wed Dec 09 08:01:01 EST 2015

morast - Wed Dec 09 07:41:22 EST 2015

You can use DXL to control other WIndows applications provided they have an OLE interface. 

 

In the DXL manual information is collected under the section "Automation client support". 

Googling on "OLE Automation" can provide more information. I guess Wikipedia will have an introduction omn the subject.

 

DXL Excel exports and imports van be found that provide good examples.  

So script which is created using this OleAutoObj oleDomDocument = oleCreateAutoObject("MSXML.DOMDocument")

can work if the script is installed on Linux environment?

Re: What is the purpose of OleAutoObj, oleMethod?
Mathias Mamsch - Wed Dec 09 10:57:07 EST 2015

Dinio - Wed Dec 09 08:01:01 EST 2015

So script which is created using this OleAutoObj oleDomDocument = oleCreateAutoObject("MSXML.DOMDocument")

can work if the script is installed on Linux environment?

Without trying: No. This is windows specific. Regards, Mathias

Re: What is the purpose of OleAutoObj, oleMethod?
Dinio - Wed Dec 09 11:02:36 EST 2015

Mathias Mamsch - Wed Dec 09 10:57:07 EST 2015

Without trying: No. This is windows specific. Regards, Mathias

OK ,Matthias but what if my Doors is deployed on *nix server how to get this DOM for example?

 

OleAutoObj oleDomDocument = oleCreateAutoObject("MSXML.DOMDocument")

Re: What is the purpose of OleAutoObj, oleMethod?
Mathias Mamsch - Wed Dec 09 11:47:59 EST 2015

Dinio - Wed Dec 09 11:02:36 EST 2015

OK ,Matthias but what if my Doors is deployed on *nix server how to get this DOM for example?

 

OleAutoObj oleDomDocument = oleCreateAutoObject("MSXML.DOMDocument")

You will not be able to use COM. XML is easy to parse, so if you care, you can write your own XML parser. There are also builtin DOORS functions for reading XML, they might be a working alternative, but I cannot tell If they work on unix:

DOM_Document_ parseXMLBuffer_ (Buffer)
DOM_Document_ parseXMLString_ (string)

DOM_Document_ getDocumentBuffer_ (DOM_Document_, Buffer&)
string getStringAttribute_ (DOM_Element_, string)
string setStringAttribute_ (DOM_Element_, string, string)

void ::do (DOM_Element_&, DOM_Element_, void)
void ::do (DOM_Element_&, DOM_Element_, void)

bool hasAttribute_ (DOM_Element_, string)
bool hasChildElements_ (DOM_Element_)

DOM_Element_ getDocumentElement_ (DOM_Document_)

string getElementName_ (DOM_Element_)
string getElementText_ (DOM_Element_)

You can use the "for DOM_Element_ in  DOM_Element do " loops to iterate over the hierarchy and the getElementName_, getElementText_, getAttributes function to read from the xml elements.

There are some drawbacks, like you cannot iterate over the attributes.

Regards, Mathias