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: module documentation
Topic Summary:
Created On: 11-Apr-2006 19:40
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 Baher Mohamed, on Wednesday, May 31, 2006 7:11 PM

Answer:
thanks, dan. Thats what i can use. still like to know whats up with the kitchen script, but this will work for my needs.

for all of you out there, this is what i modified the code to look like for attributes and views...also took out the line to close the dxl editor cause that message was annoying...

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"
close m
}
 11-Apr-2006 19:40
User is offline View Users Profile Print this message


Baher Mohamed

Posts: 63
Joined: 21-Jun-2005

is there a wizard that creates a document or report type output of all the attributes and views in a module? similar to the docuementor tool in MS Access
Report this to a Moderator Report this to a Moderator
 12-Apr-2006 08:38
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Yes, there is a kitchen script that allows you to maintain a module that catalogues all views and attributes in a project.

The menu option is Projects->catalogue.
The source file is addins/kitchen/projects/catalogue.dxl

I have posted the kitchen here.

Boring note: If you are going to use kitchen scripts, test them first before using on live data. The kitchen comes with no warranty and you use it at your own risk!

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

Edited: 12-Apr-2006 at 08:49 by Tony Goodman
Report this to a Moderator Report this to a Moderator
 14-Apr-2006 13:29
User is offline View Users Profile Print this message


Baher Mohamed

Posts: 63
Joined: 21-Jun-2005

ran the script and got this..i just kept hitting "confirm" on all the questions about attributes the script asked me...


-R-E- DXL: <Line:88> null Module parameter was passed into argument position 1
-I- DXL: execution halted
Report this to a Moderator Report this to a Moderator
 18-Apr-2006 09:19
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

This is normal with kitchen scripts - they never seem to work first time.

Try ammending the "for item in project" loop (line 84) so that null and deleted items are excluded.
Example attached

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 24-May-2006 21:05
User is offline View Users Profile Print this message


Baher Mohamed

Posts: 63
Joined: 21-Jun-2005

that didnt work tony. got the same error. :-\
Report this to a Moderator Report this to a Moderator
 25-May-2006 11:41
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

I am surprised that didn't work.
What line number was in the error mesage?

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 26-May-2006 16:41
User is offline View Users Profile Print this message


Baher Mohamed

Posts: 63
Joined: 21-Jun-2005

-R-E- DXL: <Line:88> null Module parameter was passed into argument position 1
-I- DXL: execution halted
Report this to a Moderator Report this to a Moderator
 30-May-2006 08:51
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Remove the following line (line 88) - this assumes that the item is a module before testing for it's type.

string modType = type module_ mn

Then add in it's place the following:

// we are only interested in modules
if (!module mn) continue
string modType = type(it)

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 31-May-2006 14:36
User is offline View Users Profile Print this message


Baher Mohamed

Posts: 63
Joined: 21-Jun-2005

commented out "string modType = type module_ mn" and pasted

******
// we are only interested in modules
if (!module mn) continue
string modType = type(it)
*******
got these errors....

-E- DXL: <Line:448> (modType) already declared in this scope
-E- DXL: <Line:451> incorrect arguments for (!=)
-E- DXL: <Line:451> incorrect arguments for (&&)
-E- DXL: <Line:451> incorrect arguments for (if)
-E- DXL: <Line:451> undeclared variable (modTypeC)
-I- DXL: all done with 5 errors and 0 warnings
Report this to a Moderator Report this to a Moderator
 31-May-2006 16:14
User is offline View Users Profile Print this message


Dan Hopping

Posts: 75
Joined: 21-Nov-2002

You might just print all associated views in all formal modules within a given folder, then copy the output to an MS Word file.

Folder f = current
Item i
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 s in views m do print "\t" s "\n"
close m
}
Report this to a Moderator Report this to a Moderator
 31-May-2006 18:12
User is offline View Users Profile Print this message


Baher Mohamed

Posts: 63
Joined: 21-Jun-2005

thanks, Dan, but i dont need only the view info. I wanted the attributes and their types as well. i changed "views" to "attributes" in your code but that didnt give all the attributes, let alone their types.
Report this to a Moderator Report this to a Moderator
 31-May-2006 18:46
User is offline View Users Profile Print this message


Dan Hopping

Posts: 75
Joined: 21-Nov-2002

These mods should do get you attr name and type...
Best Regards,
Dan

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 "type \"" ad.typeName "\"\n"
}
close m
}
Report this to a Moderator Report this to a Moderator
 31-May-2006 18:50
User is offline View Users Profile Print this message


Baher Mohamed

Posts: 63
Joined: 21-Jun-2005

Answer Answer
thanks, dan. Thats what i can use. still like to know whats up with the kitchen script, but this will work for my needs.

for all of you out there, this is what i modified the code to look like for attributes and views...also took out the line to close the dxl editor cause that message was annoying...

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"
close m
}

Edited: 31-May-2006 at 20:45 by Baher Mohamed
Report this to a Moderator Report this to a Moderator
 31-May-2006 19:09
User is offline View Users Profile Print this message


Dan Hopping

Posts: 75
Joined: 21-Nov-2002

I'm not a big fan of the kitchen scripts, except to dig out specific application info in areas I am weak. Tony is right, they never seem to work 'out of the box'.
Dan
Report this to a Moderator Report this to a Moderator
 31-May-2006 19:19
User is offline View Users Profile Print this message


Dan Hopping

Posts: 75
Joined: 21-Nov-2002

You mentioned that you removed the line 'close m'. Not a good idea. This will leave every module in the folder open in ReadOnly, hidden view.
The best way to run this is to close all modules then run it from the folder you want to archive information from (not a within an open module) This way, you should get no message about closing the DXL editor and it will give you a complete listing of all (formal) modules in the current folder.
Report this to a Moderator Report this to a Moderator
 31-May-2006 20:45
User is offline View Users Profile Print this message


Baher Mohamed

Posts: 63
Joined: 21-Jun-2005

glad i checked this post again....thanks!!!
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.