Topic
  • 3 replies
  • Latest Post - ‏2014-07-28T16:35:29Z by BeastBoysDad
BeastBoysDad
BeastBoysDad
19 Posts

Pinned topic How to Query Whether or Not a Module is Displayed

‏2014-07-26T03:00:18Z |

If I open a module using the DXL function "read (moduleName, false)" then the module "moduleName" opens in read-only mode and the module is not displayed in a window (it is hidden).  If I go to the DOORS database explorer and select "Tools > Manage Open Modules ..." I can see all the open modules and can see that the module that I opened has "Displayed" == "false".

What is the DXL function that I can use to query whether the "Displayed" value of a module is "true" or "false" in the same manner that  "Tools > Manage Open Modules ..." returns true/false?

Updated on 2014-07-26T03:04:06Z at 2014-07-26T03:04:06Z by BeastBoysDad
  • PRM
    PRM
    33 Posts
    ACCEPTED ANSWER

    Re: How to Query Whether or Not a Module is Displayed

    ‏2014-07-26T07:54:40Z  
    • PRM
    • ‏2014-07-26T07:46:18Z

    You need to use the isVisible(m) boolean function. See code snippet below.

    Module m
    string moduleName = "/DOORS Training Project/Customer Documentation/COC"
    
    m = read(moduleName, true)
    
    if (isVisible(m)) print "Module is visible"
    
    else print "Module is NOT visible"
    
     

    Paul Miller
    Melbourne, Australia

     

     

    The "Add Code" feature is ignoring my selection of DOORS as the format for displaying code, it defaults it to Java Script for some reason. Anyway, I have added the DOORS code snippet from my previous post below as text.

    Module m
    string moduleName = "<enter path and name of module>"
     
    m = read(moduleName, true)
     
    if (isVisible(m)) print "Module is visible"
     
    else print "Module is NOT visible"

    Paul Miller
    Melbourne, Australia

  • PRM
    PRM
    33 Posts

    Re: How to Query Whether or Not a Module is Displayed

    ‏2014-07-26T07:46:18Z  

    You need to use the isVisible(m) boolean function. See code snippet below.

    Module mstring moduleName = "/DOORS Training Project/Customer Documentation/COC"
    
    m = read(moduleName, true)
    
    if (isVisible(m)) print "Module is visible"
    
    else print "Module is NOT visible"
    
     

    Paul Miller
    Melbourne, Australia

     

     

    Updated on 2014-07-26T07:47:43Z at 2014-07-26T07:47:43Z by PRM
  • PRM
    PRM
    33 Posts

    Re: How to Query Whether or Not a Module is Displayed

    ‏2014-07-26T07:54:40Z  
    • PRM
    • ‏2014-07-26T07:46:18Z

    You need to use the isVisible(m) boolean function. See code snippet below.

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">Module mstring moduleName = "/DOORS Training Project/Customer Documentation/COC" m = read(moduleName, true) if (isVisible(m)) print "Module is visible" else print "Module is NOT visible" </pre>
     

    Paul Miller
    Melbourne, Australia

     

     

    The "Add Code" feature is ignoring my selection of DOORS as the format for displaying code, it defaults it to Java Script for some reason. Anyway, I have added the DOORS code snippet from my previous post below as text.

    Module m
    string moduleName = "<enter path and name of module>"
     
    m = read(moduleName, true)
     
    if (isVisible(m)) print "Module is visible"
     
    else print "Module is NOT visible"

    Paul Miller
    Melbourne, Australia

  • BeastBoysDad
    BeastBoysDad
    19 Posts

    Re: How to Query Whether or Not a Module is Displayed

    ‏2014-07-28T16:35:29Z  
    • PRM
    • ‏2014-07-26T07:54:40Z

    The "Add Code" feature is ignoring my selection of DOORS as the format for displaying code, it defaults it to Java Script for some reason. Anyway, I have added the DOORS code snippet from my previous post below as text.

    Module m
    string moduleName = "<enter path and name of module>"
     
    m = read(moduleName, true)
     
    if (isVisible(m)) print "Module is visible"
     
    else print "Module is NOT visible"

    Paul Miller
    Melbourne, Australia

    Great!  Thank you!