Topic
  • 6 replies
  • Latest Post - ‏2013-11-21T20:21:34Z by grasswistle
grasswistle
grasswistle
13 Posts

Pinned topic What does the null module message mean

‏2013-11-19T18:53:45Z |

Let's say there is a module whose full path is given by the string variable modname.  Let's also say that I can open and view this module in DOORS without any obvious problem.

Now, let's suppose, I run a very simple snippet of code:

Module m = read(modname)
if (null m) print "null"
else print "okay"

What are the possible reasons that would explain an output of 'null'?

This has been baffling me for weeks now.

Thanks,

Grasswistle

  • GregM_dxler
    GregM_dxler
    166 Posts
    ACCEPTED ANSWER

    Re: What does the null module message mean

    ‏2013-11-20T14:04:16Z  

    You should add a second parameter to the read() function.

     

    Module m = read(string modname, bool display)
    

    Also carefully check the spelling of your module name and ensure you are using the full path to the parent project with preceeding slash.

    According to DXL manual, you should not need the second parameter.  If it is omitted, the module should be visible when opened.  Does it open up?

    Tony is right to check the spelling of the module name.  A missing "/" at the beginning of the path will cause a null.  Should be "/project/folder/module name"

    Hope this helps,

    Greg

  • SudarshanRao
    SudarshanRao
    52 Posts
    ACCEPTED ANSWER

    Re: What does the null module message mean

    ‏2013-11-21T08:08:00Z  

    Not sure how you are getting the value for modname variable, but if it isn't through the code itself, then there's a good chance that the string is incorrect, leading to the problem. Maybe the module name has an extra blank space at the end?

    Select the module in question on right-pane of DOORS Explorer and run the following line (I'm printing the value enclosed in double-quotes so that it'll show if there's an additional blank space at the end):

    print "\"" fullName(getSelectedItem) "\""

     

    If this does not throw an error, try passing this string into the read perm - I would expect it to work.. If the above line throw null item error, I'd suggest you to contact support.. we can have it investigated formally.

  • Tony_Goodman
    Tony_Goodman
    271 Posts

    Re: What does the null module message mean

    ‏2013-11-20T11:48:18Z  

    You should add a second parameter to the read() function.

     

    Module m = read(string modname, bool display)

    Also carefully check the spelling of your module name and ensure you are using the full path to the parent project with preceeding slash.

  • GregM_dxler
    GregM_dxler
    166 Posts

    Re: What does the null module message mean

    ‏2013-11-20T14:04:16Z  

    You should add a second parameter to the read() function.

     

    <pre dir="ltr">Module m = read(string modname, bool display)</pre>

    Also carefully check the spelling of your module name and ensure you are using the full path to the parent project with preceeding slash.

    According to DXL manual, you should not need the second parameter.  If it is omitted, the module should be visible when opened.  Does it open up?

    Tony is right to check the spelling of the module name.  A missing "/" at the beginning of the path will cause a null.  Should be "/project/folder/module name"

    Hope this helps,

    Greg

  • grasswistle
    grasswistle
    13 Posts

    Re: What does the null module message mean

    ‏2013-11-20T18:17:16Z  

    According to DXL manual, you should not need the second parameter.  If it is omitted, the module should be visible when opened.  Does it open up?

    Tony is right to check the spelling of the module name.  A missing "/" at the beginning of the path will cause a null.  Should be "/project/folder/module name"

    Hope this helps,

    Greg

    Thanks for your input so far.  
    Here is some extra information:
    • The module does not open up when I issue that command.  
    • The spelling is correct and includes the preceeding forward slash.
    • This command is in a script that has not been modified in many years.  This just suddenly started being a problem with this module.
    Any other ideas--even theories?
     
    Grasswistle
  • GregM_dxler
    GregM_dxler
    166 Posts

    Re: What does the null module message mean

    ‏2013-11-20T19:56:57Z  
    Thanks for your input so far.  
    Here is some extra information:
    • The module does not open up when I issue that command.  
    • The spelling is correct and includes the preceeding forward slash.
    • This command is in a script that has not been modified in many years.  This just suddenly started being a problem with this module.
    Any other ideas--even theories?
     
    Grasswistle

    Don't know for sure.  Nothing sticks in my head as to that dxl command changing over the past few versions, but I'm not as learned as others in the forum.

    Is the problem with only a single module or is it with the dxl command?

    Did you check to see if the module is already opened in another mode?  Even in the background?

    I would have to assume that since you can open the module, then there is no problems with access rights.

    What about views?  Has the views changed in the module?  Maybe try loading the standard view to see if it helps.

    Greg

  • SudarshanRao
    SudarshanRao
    52 Posts

    Re: What does the null module message mean

    ‏2013-11-21T08:08:00Z  

    Not sure how you are getting the value for modname variable, but if it isn't through the code itself, then there's a good chance that the string is incorrect, leading to the problem. Maybe the module name has an extra blank space at the end?

    Select the module in question on right-pane of DOORS Explorer and run the following line (I'm printing the value enclosed in double-quotes so that it'll show if there's an additional blank space at the end):

    print "\"" fullName(getSelectedItem) "\""

     

    If this does not throw an error, try passing this string into the read perm - I would expect it to work.. If the above line throw null item error, I'd suggest you to contact support.. we can have it investigated formally.

  • grasswistle
    grasswistle
    13 Posts

    Re: What does the null module message mean

    ‏2013-11-21T20:21:34Z  

    Not sure how you are getting the value for modname variable, but if it isn't through the code itself, then there's a good chance that the string is incorrect, leading to the problem. Maybe the module name has an extra blank space at the end?

    Select the module in question on right-pane of DOORS Explorer and run the following line (I'm printing the value enclosed in double-quotes so that it'll show if there's an additional blank space at the end):

    print "\"" fullName(getSelectedItem) "\""

     

    If this does not throw an error, try passing this string into the read perm - I would expect it to work.. If the above line throw null item error, I'd suggest you to contact support.. we can have it investigated formally.

    You're right, there was the slightest difference in the strings.  

    Ugh.  Sorry to waste your time with this.

    Thanks,

    Grasswistle