Opening a Module

Does opening a module from a dxl script, Open the other modules linked to it???

Thanks!!
gankir - Sun Jan 15 23:51:52 EST 2012

Re: Opening a Module
SystemAdmin - Mon Jan 16 01:09:45 EST 2012

Yes it can...but there's more to it.

Assuming that you're using DXL to open up a module so that it displays on the screen (is not hidden).

DOORS will open link modules when the currently opened module contains links - this will open up the associated link modules in a read-only hidden mode.

DOORS will open up other formal modules if the default opening view has DXL Layout or DXL Attribute columns that contains code to display data at the other end of incoming or outgoing links - for example, any trace columns that have been created using the DOORS Analysis Wizard tool.

A way to see this in action is to start a fresh DOORS session - select Tools > Manage Open Modules from the DOORS Explorer menu. The "Manage Open Modules" dialogue box will show you the status of all hidden and displayed opened modules for the current user session. Open a module that has links and see what happens - go to a view in a module that has some trace columns and see what happens(although you may need to scroll the display until objects with links appear as this will trigger the opening of the other modules).
Paul Miller
Melbourne, Australia

Re: Opening a Module
gankir - Mon Jan 16 02:15:34 EST 2012

SystemAdmin - Mon Jan 16 01:09:45 EST 2012
Yes it can...but there's more to it.

Assuming that you're using DXL to open up a module so that it displays on the screen (is not hidden).

DOORS will open link modules when the currently opened module contains links - this will open up the associated link modules in a read-only hidden mode.

DOORS will open up other formal modules if the default opening view has DXL Layout or DXL Attribute columns that contains code to display data at the other end of incoming or outgoing links - for example, any trace columns that have been created using the DOORS Analysis Wizard tool.

A way to see this in action is to start a fresh DOORS session - select Tools > Manage Open Modules from the DOORS Explorer menu. The "Manage Open Modules" dialogue box will show you the status of all hidden and displayed opened modules for the current user session. Open a module that has links and see what happens - go to a view in a module that has some trace columns and see what happens(although you may need to scroll the display until objects with links appear as this will trigger the opening of the other modules).


Paul Miller
Melbourne, Australia

Hello Mr. Miller,

Thanks for your response and clarification. Really helpful.

Is there a way to find out the opened modules that were linked when a particular module that was opened by dxl and finally close them all?? Is there a way to get the handle to these modules which are opened read(hidden mode)??

Thanks!!

Re: Opening a Module
llandale - Mon Jan 16 13:12:22 EST 2012

gankir - Mon Jan 16 02:15:34 EST 2012
Hello Mr. Miller,

Thanks for your response and clarification. Really helpful.

Is there a way to find out the opened modules that were linked when a particular module that was opened by dxl and finally close them all?? Is there a way to get the handle to these modules which are opened read(hidden mode)??

Thanks!!

Layout and AttrDXL opening modules is fundamenatlly different than when DOORS opens other modules when you open a module. Those other modules DOORS opens keeps a "count" somehow of open references, and when that count reaches zero that module is auto closed. So if you open a module with links then the link module is auto-opened, and its auto-closed when the first module is closed, so long as no other module also has it auto-opened.

I notice that a "close" fails when the count is > 0, which means you cannot manually close the link module while its formal is still open (you can test that with the Manage Open Modules dialog, select the link module and try to close it with the button).

Not so with Attr-DxL or layouts, those other modules stay opened.

You can see which modules are current open with this:
  • for m in database do; if (!isVisible(m)) print name(m) "\tis open invisibly\n"

I suppose you could do that before you open some formal module, keep the results, open the module, then do it again and compare. I've neve bothered to do it but you can somehow get that open "count" and see which modules had their count inceased, and can therefore deduce which were opened ..err.. needed to be opened by your formal module.

What are you trying to accomplish?

-Louie

Re: Opening a Module
SystemAdmin - Mon Jan 16 15:31:51 EST 2012

gankir - Mon Jan 16 02:15:34 EST 2012
Hello Mr. Miller,

Thanks for your response and clarification. Really helpful.

Is there a way to find out the opened modules that were linked when a particular module that was opened by dxl and finally close them all?? Is there a way to get the handle to these modules which are opened read(hidden mode)??

Thanks!!

In addition to Louie's informative response, this process of auto opening modules is used by DOORS as a kind of caching mechanism to improve the performance of the tool - the double edged sword though is that many modules can remain auto opened in a read only hidden mode and gobble up a lot of memory. Read only hidden mode can also be the reason why some project and module level functions fail or raise unexpected warnings - for example, trying to delete a link module when it's currently open but hidden, or trying to Archive a project that has modules that are open but hidden.


Paul Miller
Melbourne, Australia

Re: Opening a Module
gankir - Mon Jan 16 22:37:31 EST 2012

llandale - Mon Jan 16 13:12:22 EST 2012
Layout and AttrDXL opening modules is fundamenatlly different than when DOORS opens other modules when you open a module. Those other modules DOORS opens keeps a "count" somehow of open references, and when that count reaches zero that module is auto closed. So if you open a module with links then the link module is auto-opened, and its auto-closed when the first module is closed, so long as no other module also has it auto-opened.

I notice that a "close" fails when the count is > 0, which means you cannot manually close the link module while its formal is still open (you can test that with the Manage Open Modules dialog, select the link module and try to close it with the button).

Not so with Attr-DxL or layouts, those other modules stay opened.

You can see which modules are current open with this:

  • for m in database do; if (!isVisible(m)) print name(m) "\tis open invisibly\n"

I suppose you could do that before you open some formal module, keep the results, open the module, then do it again and compare. I've neve bothered to do it but you can somehow get that open "count" and see which modules had their count inceased, and can therefore deduce which were opened ..err.. needed to be opened by your formal module.

What are you trying to accomplish?

-Louie

Thanks for your response.

I did the following as per Mr. Miller's post.

1. Opened "Manage Open Modules" dialog.
2. I opened a module which had links.
3. In the "Manage Open Modules" dialog i could see all the modules which was linked to the opened module were opened, but visible column was displaying "No".
4. Now when i close the first module which i had opened, the other modules displayed in the "Manage Open Modules" were not closed.
5. I am actually trying to close these modules using the dxl script. Is there a API/function to get all the modules which were opened when a particular module is opened??

Thanks!!

Re: Opening a Module
llandale - Tue Jan 17 12:17:54 EST 2012

gankir - Mon Jan 16 22:37:31 EST 2012
Thanks for your response.

I did the following as per Mr. Miller's post.

1. Opened "Manage Open Modules" dialog.
2. I opened a module which had links.
3. In the "Manage Open Modules" dialog i could see all the modules which was linked to the opened module were opened, but visible column was displaying "No".
4. Now when i close the first module which i had opened, the other modules displayed in the "Manage Open Modules" were not closed.
5. I am actually trying to close these modules using the dxl script. Is there a API/function to get all the modules which were opened when a particular module is opened??

Thanks!!

Opening a module should also open its associated Link Modules, not the Formal modules on the other end of the link. Since these are opening its likely the default view for your original module has Layout that opens those other modules.

Start again with all modules closed. Go to your original module folder. Edit DXL and run this:
  • read("NameModule", true, true)
which should open it with the Standard view. Then check out the Manage Module's dialog which will show the module and the link module, when you close it all will close.

  • Louie

Re: Opening a Module
fmz007 - Thu Jun 20 21:33:24 EDT 2019

llandale - Tue Jan 17 12:17:54 EST 2012
Opening a module should also open its associated Link Modules, not the Formal modules on the other end of the link. Since these are opening its likely the default view for your original module has Layout that opens those other modules.

Start again with all modules closed. Go to your original module folder. Edit DXL and run this:

  • read("NameModule", true, true)
which should open it with the Standard view. Then check out the Manage Module's dialog which will show the module and the link module, when you close it all will close.

  • Louie

Louie,

Re: Opening a Module
Mike.Scharnow - Fri Jun 21 04:47:25 EDT 2019

fmz007 - Thu Jun 20 21:33:24 EDT 2019

Louie,

if you enable the "print pathArray[i]" and look closely at the result, you will notice the problem.

CMMod_path contains the fullName of CMMod. Assume CMMod it is called "Requirements" in the folder "/Customer/Custom1". Then CMMod_path will have the value "/Customer/Custom1/Requirements".

And PLPath will have the value "/Customer/Custom1/Requirements/Payload".

 

I think, in line 2 of your code you rather want

string CMMod_path = path(CMMod)

 

Re: Opening a Module
fmz007 - Fri Jun 21 13:22:17 EDT 2019

Mike.Scharnow - Fri Jun 21 04:47:25 EDT 2019

if you enable the "print pathArray[i]" and look closely at the result, you will notice the problem.

CMMod_path contains the fullName of CMMod. Assume CMMod it is called "Requirements" in the folder "/Customer/Custom1". Then CMMod_path will have the value "/Customer/Custom1/Requirements".

And PLPath will have the value "/Customer/Custom1/Requirements/Payload".

 

I think, in line 2 of your code you rather want

string CMMod_path = path(CMMod)

 

Works!

Hmmm...how come it never came to my attention! excellent catch!

Thanks Mike!