How to return values from DOORS DXL to C#

My DXL is (test2.dxl):

string max()
{
val="My DXL"
return val
}

My C# code is:

string DXLStr = "#include <E:/AnithaL/test2.dxl>;\n string sResult = max() \"\";\n return_(sResult);";
x.runStr(DXLStr);
Console.Write("Result = " + x.result);

Please help me to get the value of 'val' in C# and then to print it in the Console?
SystemAdmin - Fri Mar 15 01:53:59 EDT 2013

Re: How to return values from DOORS DXL to C#
llandale - Fri Mar 15 12:45:28 EDT 2013

Oops. "return_" is for "eval_" code and needs to be replaced with something I don't know.

If nobody else tells us the "right way", send the DXL the name of some temporary file; the DXL puts the results in a file, and you read the file in C after the call.

-Louie

Re: How to return values from DOORS DXL to C#
SystemAdmin - Sat Mar 16 09:08:11 EDT 2013

Hi

The only idea I have is to use a named pipe - http://msdn.microsoft.com/de-de/library/windows/desktop/aa365783%28v=vs.85%29.aspx

Good luck
Wolfgang

Re: How to return values from DOORS DXL to C#
Mathias Mamsch - Sun Mar 17 10:02:23 EDT 2013

SystemAdmin - Sat Mar 16 09:08:11 EDT 2013
Hi

The only idea I have is to use a named pipe - http://msdn.microsoft.com/de-de/library/windows/desktop/aa365783%28v=vs.85%29.aspx

Good luck
Wolfgang

You need to use oleSetResult instead of return_ from DXL and get the result from c# in the result property of the DOORS application object. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: How to return values from DOORS DXL to C#
SystemAdmin - Mon Mar 18 07:40:00 EDT 2013

Mathias Mamsch - Sun Mar 17 10:02:23 EDT 2013
You need to use oleSetResult instead of return_ from DXL and get the result from c# in the result property of the DOORS application object. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Thanks a lot Mathias, its working perfect.

I have replaced return_ with oleSetResult. And x.result provides me what I require.

string DXLStr = "#include <E:/AnithaL/test2.dxl>;\n string sResult = max() \"\";\n oleSetResult(sResult);";
x.runStr(DXLStr);
Console.Write("Result = " + x.result);