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: Error running runfile from Office
Topic Summary:
Created On: 11-Mar-2004 02:01
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 Tony Goodman, on Friday, March 11, 2005 4:48 PM

Answer:
If you want to pass parameters, then you'll need to use the runStr method instead.

e.g.

DOORSObj.runStr("#include <addins/myfuncs.inc>\n myFunction(""myModName"")")

Note that for string parameters you have to be careful to escape the quotes within the string.
From word I beleive this is done by doubling them up.


 11-Mar-2004 02:01
User is offline View Users Profile Print this message


CW Pang

Posts: 3
Joined: 11-Mar-2004

Dear all,

I installed DOORS 5.0 on my Win2K PC try to execute some dxl from office applications (MS Word, Excel) but there is alway an error. The error when the second line of code is added to the module. Any clue? Many thanks! --Peter

Set DOORSObj = CreateObj ("DOORS.Application")
DOORSOBJ.runfile ("C:\abc.dxl")


Error message:

Run-time error "-2147417851 (80010105)
Method 'runfile' of object 'DIDoorsDXL' failed

Edited: 11-Mar-2004 at 04:24 by CW Pang
Report this to a Moderator Report this to a Moderator
 11-Mar-2004 08:19
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

I am guessing that DOORS is not already running when you make the call.

This gives you the error when you try to run the file before the user has logged into DOORS.

The following example is from the manual and shows how to log in.

Sub testDoors()

Set DOORSObj = CreateObject("DOORS.Application")
SendKeys "John Smith" & "{TAB}" & "password" & "{ENTER}", True
DOORSObj.runFile ("c:\doors\lib\dxl\example\ddbintro.dxl")

End Sub



-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 12-Mar-2004 06:18
User is offline View Users Profile Print this message


CW Pang

Posts: 3
Joined: 11-Mar-2004

Thanks Tony for your information.

I can get the DOORS triggered by Word.
One more question, is it possible to pass parameters from Word to DOORS so that a particular project, module and document can be opened. It works in DOORS 4.x but it is not working in DOORS 5.x

Best Regards,
Peter
Report this to a Moderator Report this to a Moderator
 12-Mar-2004 08:19
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Answer Answer
If you want to pass parameters, then you'll need to use the runStr method instead.

e.g.

DOORSObj.runStr("#include <addins/myfuncs.inc>\n myFunction(""myModName"")")

Note that for string parameters you have to be careful to escape the quotes within the string.
From word I beleive this is done by doubling them up.




-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 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 1 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.