• 1 reply
  • Latest Post - ‏2014-08-12T17:16:10Z by llandale
1 Post

Pinned topic Cannot share a module from a User menu script

‏2014-08-12T09:45:44Z | menu module script ser share

I face a strange problem. I am on Doors

I have written a DXL which will open in share mode a module.

Module theModule          = null;
string theModuleFullName  = "/PROJECT/DIRECTORY/MODULE";

theModule = share(theModuleFullName);
if (theModule == null)
    errorBox "ERROR : Can not share module\n";

I have tested it in the DXL editor, and it works.

I want to execute this script quite often, so I have set in in the "User" menu. But when I launch I have always a problem for getting the module shared (with or wittout the option of module display in the share function).

The most strange is that I also try this code on another module, and it works.

May I precise that for this, I am the only user connected on the Doors database, and that the module is not already open and there is not lock on it.


If someone can help me, (s)he will be welcome.

  • llandale
    3035 Posts

    Re: Cannot share a module from a User menu script


    First off, the "user" menu applies to Formal modules only; it does not appear in the Explorer.  Your script seems to be an explorer context script.

    Be advised that if the module is open Exclusively, it will NOT be downgraded to "shared".  Likewise if you "read" an already Edited or Shared module, the mode doesn't change.  There are 'downgrade" function for that:

    • bool downgradeShare(Module)
    • bool downgrade(Module)

    If THIS module is the one that is open, you can "Switch" modes via Edit menu >>Edit Mode.  This function DOES downgrade the module.

    Otherwise, your script seems to work from me when run from that specific open module