Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Waiting/Recieving a return statement from outside DOORS.
Topic Summary:
Created On: 27-Aug-2007 19:21
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Reik Schroeder, on Tuesday, August 28, 2007 2:36 PM

Answer:
Hi Scott,

as described in thread you found already, there is a return value.
The return value is the text written to stdout in your C-Code, so you can simply write to stdout in your code and will get this back in DXL.

Here is an example for retrieving information from Clearcase (CVS). It is a little bit more complicated, because it is able to run on unix and win32 plattforms.
I've used this a long time ago to import a version tree into doors module.

Hope that helps,
Greetings
Reik
 27-Aug-2007 19:21
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

Just curious if there is a function that I can use to call an outside script, like a C++ program and wait for it to return a value, whether it be a true or false or 0 or -1, it doesn't matter.  I just need it return the value to a variable in my DXL script and make it wait until it receives the return before continuing with the script.

Thanks,

-------------------------
Scott Boisvert
Engineering Tools Administrator
L-3 Communications - Avionics Systems
scott.boisvert@l-3com.com
Report this to a Moderator Report this to a Moderator
 27-Aug-2007 19:30
User is offline View Users Profile Print this message


Kevin Murphy

Posts: 206
Joined: 15-Jul-2005

I am talking in theory here...I have nothing but life experience to back this up, so I have not tested it

One thing you may be able to do is to use OLE automation to run a macro that calls your file. Have DOORS open an Excel file and run a macro. I believe DXL execution is halted until the macro completes. You can set the macro to set a certain cell to be true or false, 1 or 0, etc.

The next command reads that cell.

Good idea?

-------------------------
Kevin Murphy
http://www.baselinesinc.com
The Requirements Management Experts
Report this to a Moderator Report this to a Moderator
 27-Aug-2007 20:37
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

Well, I'm not great with the OLE automation, actually I haven't really used it all that much.  It is something on my list to learn though. 

I have used Dennis Lockshine's systemWait function, found here: https://support.telelogic.com/en/doors/forums/messageview.cfm?catid=17&threadid=725&highlight_key=y&keyword1=system%20AND%20command though it doesn't except a return value, I think modifying it to read from a text file might work. 

-------------------------
Scott Boisvert
Engineering Tools Administrator
L-3 Communications - Avionics Systems
scott.boisvert@l-3com.com
Report this to a Moderator Report this to a Moderator
 28-Aug-2007 08:27
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Answer Answer
Hi Scott,

as described in thread you found already, there is a return value.
The return value is the text written to stdout in your C-Code, so you can simply write to stdout in your code and will get this back in DXL.

Here is an example for retrieving information from Clearcase (CVS). It is a little bit more complicated, because it is able to run on unix and win32 plattforms.
I've used this a long time ago to import a version tree into doors module.

Hope that helps,
Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 28-Aug-2007 17:18
User is offline View Users Profile Print this message


Kevin Murphy

Posts: 206
Joined: 15-Jul-2005

Just to add--

I tested the attached code. In excel, I created a macro named testmacro. All it does is display a msgbox "hello world"

After the macro is called, DOORS calls "Hello DOORS"...

The Hello DOORS does not get executed until the macro is done running.

So this is another method you could use if you ever get VBA inclined!

-------------------------
Kevin Murphy
http://www.baselinesinc.com
The Requirements Management Experts
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 2 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.