![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
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 |
![]() |
![]()
|
![]() 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 | |
![]() |
|
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 |
|
![]() |
|
![]() |
|
Script attached.
------------------------- Tony Goodman http://www.smartdxl.com Edited: 25-Apr-2005 at 15:54 by Tony Goodman |
|
![]() |
|
![]() |
|
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
|
|
![]() |
|
![]() |
|
Ups, here again:
|
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Browsing through subfolders in a project
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.