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: DOORS dxl for module documentation
Topic Summary:
Created On: 20-Nov-2006 20:33
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 ron lewis, on Tuesday, November 21, 2006 6:43 PM

Answer:
You need to make one more change to meet your needs of reading modules in subfolders


change line: s = name i
to:

s = fullName i

also since your code doesn't do any error check you could add 'noError' to start of each loop
 20-Nov-2006 20:33
User is offline View Users Profile Print this message


Baher Mohamed

Posts: 63
Joined: 21-Jun-2005

i've got the below code and it works fine as it is, but i have many folders so i have to click in each one, one at a time...can anyone tell me how i can have it start in a project and just loop through folders on its own? thanks!

Folder f = current

Item i

AttrDef ad

for i in f do {

string s = type i

if(s != "Formal") continue

s = name i

print s "\n"

Module m = read(s, false)

for ad in current Module do {

print "\tAttribute: " ad.name

print " {" ad.typeName "}" "\n"

}

for s in views m do print "\t" "View:" s "\n"

}
Report this to a Moderator Report this to a Moderator
 20-Nov-2006 20:56
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Change line :
Folder f = current
to
Project f=current
Report this to a Moderator Report this to a Moderator
 20-Nov-2006 21:03
User is offline View Users Profile Print this message


Baher Mohamed

Posts: 63
Joined: 21-Jun-2005

thats the first thing i tried and i got this error: -R-E- DXL: <Line:19> null Attribute Def do loop parameter was passed
-I- DXL: execution halted


when i ran it from a project that had no folders in it, just modules it ran ok...but as soon as i moved to the next project i got the error...
Report this to a Moderator Report this to a Moderator
 20-Nov-2006 21:12
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

change line:

for ad in current Module do{
to:
for ad in m do{
Report this to a Moderator Report this to a Moderator
 20-Nov-2006 21:18
User is offline View Users Profile Print this message


Glenn Valentine

Posts: 3
Joined: 17-Nov-2006

same error :'(

Edited: 20-Nov-2006 at 21:22 by Glenn Valentine
Report this to a Moderator Report this to a Moderator
 20-Nov-2006 21:21
User is offline View Users Profile Print this message


Dennis Lockshine

Posts: 113
Joined: 7-Apr-2003

Try this.
Report this to a Moderator Report this to a Moderator
 20-Nov-2006 21:29
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Reason for the blow up on your original code is of of a null module
add line: if(null m ) continue

after line: Module m = read(s, false)
Report this to a Moderator Report this to a Moderator
 20-Nov-2006 21:34
User is offline View Users Profile Print this message


Glenn Valentine

Posts: 3
Joined: 17-Nov-2006

quote:

Originally posted by: Dennis Lockshine
Try this.


DOORS takes a long while running your code and i end up killing the process.  i have about 60 modules in the project...could that be the cause of the issues?  i'm guessing it is but thought you might know for sure...
Report this to a Moderator Report this to a Moderator
 20-Nov-2006 21:43
User is offline View Users Profile Print this message


Glenn Valentine

Posts: 3
Joined: 17-Nov-2006

quote:

Originally posted by: ron lewis
Reason for the blow up on your original code is of of a null module add line: if(null m ) continue after line: Module m = read(s, false)


the code doesnt get any errors but it only lists module names now with no other info...i'm guessing that for some reason it isnt entering the loop to get at the attributes and views...attached is the code with your updates baked in...
Report this to a Moderator Report this to a Moderator
 20-Nov-2006 21:47
User is offline View Users Profile Print this message


Baher Mohamed

Posts: 63
Joined: 21-Jun-2005

sorry for the confusion but for some reason i got logged in as my coworker Glenn....i followed a link he sent me a forum and didnt realize i got logged in as him....
Report this to a Moderator Report this to a Moderator
 21-Nov-2006 13:00
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

It listed modules and attributes on my installation
Report this to a Moderator Report this to a Moderator
 21-Nov-2006 14:27
User is offline View Users Profile Print this message


Dennis Lockshine

Posts: 113
Joined: 7-Apr-2003

quote:

Originally posted by: Glenn Valentine
DOORS takes a long while running your code and i end up killing the process.  i have about 60 modules in the project...could that be the cause of the issues?  i'm guessing it is but thought you might know for sure...
Of course it takes a really long time to process. You're looping through each and every formal module in the database (starting from the folder you're currently in), opening the module and printing data about each attribute and view. It takes time to open each module, and printing a lot of data to the DXL window is also inefficient.

To improve performance you can:
1. Create a buffer and add the module descriptions to the buffer. When you're done processing all the modules, print the contents of the buffer or write it to a file. (look at Glenn Valentine's post and his usage of "outBuf")
2. Add a progress bar so you can get some feedback for which module is being processed, and allow the user (you) to cancel the operation.
3. Use a skip list or other method to limit the number of modules you want to process. A smaller number of modules will take less time to process.

If you just want to see which modules the code would process, add a continue statement just before you read the module. That will finish very quickly and only list all of the modules.

-Dennis
Report this to a Moderator Report this to a Moderator
 21-Nov-2006 15:47
User is offline View Users Profile Print this message


Baher Mohamed

Posts: 63
Joined: 21-Jun-2005

quote:

Originally posted by: ron lewis
It listed modules and attributes on my installation


did it list views in addition to the modules and attributes you stated? thanks i'm going to rerun it later on to see whats up...
Report this to a Moderator Report this to a Moderator
 21-Nov-2006 16:25
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Answer Answer
You need to make one more change to meet your needs of reading modules in subfolders


change line: s = name i
to:

s = fullName i

also since your code doesn't do any error check you could add 'noError' to start of each loop
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.