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: How to run a project specific script
Topic Summary:
Created On: 22-Mar-2006 14:19
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.
 22-Mar-2006 14:19
User is offline View Users Profile Print this message


Oren Nave

Posts: 2
Joined: 22-Mar-2006

I have a dxl script which exports a module content to a file.
This script works fine from within a certain module, but I need it to run
from a command line (...\DOORS.EXE -b <MyDXL>.

How do I point it to export from a specific project (with all it's modules) ??
When I'm using Project p = project "MyProjName" and try to loop with something like:
For m in p do
{
...
}
It wo'nt work (no modules been found)!

Tnx.
Report this to a Moderator Report this to a Moderator
 22-Mar-2006 14:48
User is offline View Users Profile Print this message


Dennis Lockshine

Posts: 113
Joined: 7-Apr-2003

The "for module in project" loop only works for open modules in the project, and when running in batch mode, there are none.

One solution is to declare a string variable (moduleName) and use "for moduleName in project", but this will only get top level modules.

The best method for looping through a project to find all Formal modules is to declare an item variable (i) and use "for i in project". This will assign i to be each successive undeleted item (for which the user has read access) in the project, looping recursively through contained folders and projects. You will need to test the results to make sure you only process Formal modules.

-Dennis
Report this to a Moderator Report this to a Moderator
 22-Mar-2006 21:29
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Yes, this is routine:
Item itm
for itm in pCurr do
{ if (type(itm) != "Formal") continue
...
}

There may be some benefit to making that project the current project before looping through its modules; but I cannot think of why you would need to do that.

- Louie
Report this to a Moderator Report this to a Moderator
 23-Mar-2006 12:50
User is offline View Users Profile Print this message


Oren Nave

Posts: 2
Joined: 22-Mar-2006

Thank u for the good intentions but my question was misunderstood.
I do know how to get a handle to all the modules in the current project.
I do NOT know how to get the modules of a specific project (which is NOT the current one).
If a little dxl code is availble I'll be most thankful.
Report this to a Moderator Report this to a Moderator
 23-Mar-2006 13:11
User is offline View Users Profile Print this message


Pekka Mäkinen

Posts: 276
Joined: 18-Mar-2004

Maybe you can set the other project to be be current? current = project "/Project name/Subproject name"

-------------------------
Pekka.Makinen@softqa.fi
SoftQA Oy -http://www.softqa.fi/
Report this to a Moderator Report this to a Moderator
 23-Mar-2006 13:40
User is offline View Users Profile Print this message


cliff Bly

Posts: 58
Joined: 11-Apr-2003

Several steps.
1. Does the user select which project? If so, see earlier posts on fnMiniExplorer.
https://support.telelogic.com/en/doors/forums/messageview.cfm?catid=17&threadid=2424&highlight_key=y&keyword1=fnMiniExplorer
2. Once in the project/folder, you will need a recursive loop in case there are subprojects/folders. See code below:

-------------------------
Cliff Bly


Edited: 23-Mar-2006 at 13:45 by cliff Bly
Report this to a Moderator Report this to a Moderator
 23-Mar-2006 14:54
User is offline View Users Profile Print this message


Dennis Lockshine

Posts: 113
Joined: 7-Apr-2003

Oren, you answered your own question while you were stating it.

quote:

Originally posted by: Oren Nave
When I'm using Project p = project "MyProjName" and try to loop with something like:
For m in p do
<snip>

You just need to continue developing your code to include the quality suggestions made in this thread.

-Dennis
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 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 0 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.