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: Closing all Open modules
Topic Summary:
Created On: 22-Sep-2006 10:37
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-Sep-2006 10:37
User is offline View Users Profile Print this message


Subrojyoti Sengupta

Posts: 52
Joined: 18-Nov-2005

Hi,
Does anyone have any idea on how to close all the open modules in a database.
Like what we do from the menu,  Tools->Manage Open Modules..-> Close Modules.

Any particular function which does the same operation. 
Report this to a Moderator Report this to a Moderator
 22-Sep-2006 12:12
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

The loop for module in database returns open modules only.

e.g.

Module m

for m in database do
{
close(m)
}

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 28-Sep-2006 19:43
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

You'll need to run the loop twice, and the first time some modules are not closed because they are open via reference to some other opened module. Actually, IIRC, you should run the loop 3 times.

I'd be tempted to add "if (isVisible(mod)) continue" to avoid closing visible modules.

- Louie
Report this to a Moderator Report this to a Moderator
 29-Sep-2006 09:11
User is offline View Users Profile Print this message


Robert Swan

Posts: 86
Joined: 14-Apr-2005

My 'version runs two loops, the first checks the module type is NOT link and closes the required open modules, then repeats the loop for link modules. That way you avoid 'unable to close' messages.
Report this to a Moderator Report this to a Moderator
 29-Sep-2006 17:25
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Attached is the function I use. Its old and should be updated. IIRC, there was a serious issue with the perm "unsaved" which did NOT always catch all the changes (at least in DOORS v6), and thus the function should be modified.

fAppend should be replaced by concatenation
fGetAndDelete should be replaced with getting the info, deleting the buffer, then returning the info.

Golly, this sure is an ugly function. Did I really write this???

- Louie
Report this to a Moderator Report this to a Moderator
 29-Sep-2006 17:25
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Attached is the function I use. Its old and should be updated. IIRC, there was a serious issue with the perm "unsaved" which did NOT always catch all the changes (at least in DOORS v6), and thus the function should be modified.

fAppend should be replaced by concatenation
fGetAndDelete should be replaced with getting the info, deleting the buffer, then returning the info.

Golly, this sure is an ugly function. Did I really write this???

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