![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: module not closed: invalid module Topic Summary: DXL script error Created On: 11-Dec-2007 11:27 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Hi Lisa, it seems that the module you want to close is already closed. The attached code will reproduce the error when any module is opened. Greetings Reik | |
![]() |
|
Hi there
Has anyone come across this error before please? I can't figure out why I am getting this. My script loops through the modules in the database, performs actions, and closes them. It appears to get to the end, and throw this error. I've not had this before with similar loops. Any help appreciated. Thanks |
|
![]() |
|
![]() |
|
Hi Lisa,
it seems that the module you want to close is already closed. The attached code will reproduce the error when any module is opened. Greetings Reik ------------------------- Evosoft GmbH for Siemens Industry Sector Berlin, Germany |
|
![]() |
|
![]() |
|
Hi there
I think that explains it, looking at the code again. Many thanks |
|
![]() |
|
![]() |
|
Know that when you open a formal module, even invisibly, you also open all the link modules associated with outlinks from that module. When you close the formal module the link module is also closed.
Actually, there is a 'count' of open references for the link module which increases with each open formal module keeping it open. When you open a formal the count is incremented for each of its link modules. When you close the formal the count is decremented, when it reaches zero its closed also. So, if you loop through 'all' the modules in the database you are also looping through the open link modules. But they may close when you close a formal and I believe that will mess up the loop. Instead, try something like the attached, which stages the modules you care about in a Skip. - Louie |
|
![]() |
|
![]() |
|
I routinely check that the module handle is non-null and that the module is open before closing it.
// Something like this if (!null m) { if (open(module fullName m)) { close(m) } } Before using any variable of type Module, Item, Object etc you should check for null. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
module not closed: invalid module
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.