Topic
  • 9 replies
  • Latest Post - ‏2019-06-21T17:22:17Z by fmz007
gankir
gankir
5 Posts

Pinned topic Opening a Module

‏2012-01-16T04:51:52Z |
Does opening a module from a dxl script, Open the other modules linked to it???

Thanks!!
Updated on 2012-01-17T17:17:54Z at 2012-01-17T17:17:54Z by llandale
  • SystemAdmin
    SystemAdmin
    3180 Posts

    Re: Opening a Module

    ‏2012-01-16T06:09:45Z  
    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
  • gankir
    gankir
    5 Posts

    Re: Opening a Module

    ‏2012-01-16T07:15:34Z  
    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!!
  • llandale
    llandale
    3088 Posts

    Re: Opening a Module

    ‏2012-01-16T18:12:22Z  
    • gankir
    • ‏2012-01-16T07:15:34Z
    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
  • SystemAdmin
    SystemAdmin
    3180 Posts

    Re: Opening a Module

    ‏2012-01-16T20:31:51Z  
    • gankir
    • ‏2012-01-16T07:15:34Z
    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
  • gankir
    gankir
    5 Posts

    Re: Opening a Module

    ‏2012-01-17T03:37:31Z  
    • llandale
    • ‏2012-01-16T18:12:22Z
    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!!
  • llandale
    llandale
    3088 Posts

    Re: Opening a Module

    ‏2012-01-17T17:17:54Z  
    • gankir
    • ‏2012-01-17T03:37:31Z
    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
  • fmz007
    fmz007
    3 Posts

    Re: Opening a Module

    ‏2019-06-21T01:33:24Z  
    • llandale
    • ‏2012-01-17T17:17:54Z
    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,

  • Mike.Scharnow
    Mike.Scharnow
    585 Posts

    Re: Opening a Module

    ‏2019-06-21T08:47:25Z  
    • fmz007
    • ‏2019-06-21T01:33:24Z

    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)
    

     

    Updated on 2019-06-21T08:47:47Z at 2019-06-21T08:47:47Z by Mike.Scharnow
  • fmz007
    fmz007
    3 Posts

    Re: Opening a Module

    ‏2019-06-21T17:22:17Z  

    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

    <pre class="javascript dw" dir="ltr">string CMMod_path = path(CMMod) </pre>

     

    Works!

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

    Thanks Mike!

    Updated on 2019-06-21T23:11:26Z at 2019-06-21T23:11:26Z by fmz007