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: Browsing through subfolders in a project
Topic Summary:
Created On: 25-Apr-2005 09:00
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 Louie Landale, on Tuesday, April 26, 2005 10:12 AM

Answer:
I'm sure Goodman got it right, but to summarize you need to find each Item in the Project, then make sure this item is type "Formal" and isn't deleted. Then NameModule = fullName(itm) and away you go.

- Louie
 25-Apr-2005 09:00
User is offline View Users Profile Print this message


Edwin Buisman

Posts: 38
Joined: 12-Aug-2004

Ls.

in the DXL reference manual, there is a chapter on looping within porject, This chapter is rather empty, therefore my question in this forum.

I want to create a script that does some general checks in the project, the attached script only works for open modules, how can i assure that this works for an entire project?

Best regards,

Edwin Buisman.
ICT Embedded B.V.
Munsterstraat 7
7418 EV Deventer
Tel: +31-(0)570-504964
in KLF:+49-(0)2842958887
Report this to a Moderator Report this to a Moderator
 25-Apr-2005 12:10
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Script attached.

-------------------------
Tony Goodman
http://www.smartdxl.com

Edited: 25-Apr-2005 at 15:54 by Tony Goodman
Report this to a Moderator Report this to a Moderator
 25-Apr-2005 14:49
User is offline View Users Profile Print this message


Selma Cankaya

Posts: 5
Joined: 30-Mar-2005

Hi Edwin, I tried this and it worked: //*************************************************************************** // Variable declaration //*************************************************************************** //Module reqModule string reqModule Object reqObject int countObject = 0 int countReq = 0 string strPriority = "" string strStability = "" string strNone = "" //*************************************************************************** // Fetch the attribute types and initialize the strings to use them for compare with // the attribute values of Priority and Stability //*************************************************************************** //AttrType prioType = find(current,"Priority_Type") //AttrType stabType = find(current,"Stability_Type") //strPrioNone = prioType.strings[0] // Copy the "None" string into the variable //strStabNone = stabType.strings[0] // Copy the "None" string into the variable strPrioNone = "None" strStabNone = "None" //*************************************************************************** // Check if current project is open //*************************************************************************** if (null current Project) { ack "No project is open" halt } //*************************************************************************** // Open file to store results //*************************************************************************** Stream output = write "f:\\scan_modules.txt" //*************************************************************************** // Scan through each open module of this project and count the number of // objects and requirements //*************************************************************************** string s for s in database do { print s "\n" } for reqModule in current Project do { // -> use type string instead of Module Module mod = read(reqModule, false) //-> and use Module here countObject = 0 countReq = 0 //reqObject = current Object for reqObject in mod do { countObject++ } output << "Module : " mod."Name" "\n" output << "Number of objects : " countObject "\n" output << "Number of requirements: " countReq "\n" output << "-----------------------------------------------\n" } //*************************************************************************** // Close file //*************************************************************************** close (output) infoBox "finished" --- BR, Selma
Report this to a Moderator Report this to a Moderator
 25-Apr-2005 14:53
User is offline View Users Profile Print this message


Selma Cankaya

Posts: 5
Joined: 30-Mar-2005

Ups, here again:
Report this to a Moderator Report this to a Moderator
 25-Apr-2005 16:59
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Answer Answer
I'm sure Goodman got it right, but to summarize you need to find each Item in the Project, then make sure this item is type "Formal" and isn't deleted. Then NameModule = fullName(itm) and away you go.

- Louie
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.