How to create a self defined menu on the main Doors menu

Hi, all

I want to create a self defined menu on the main Doors menu, aim to click it and then run a function to archive specific project automaticlly, the code to archive project was finished, however, after I consult the "dxl.help", there seems no way to realize it.

Could anyone give me some hints or tips, of course, code is more appreciate, thanks!~
Aven_HIT - Wed Apr 14 11:25:06 EDT 2010

Re: How to create a self defined menu on the main Doors menu
Mathias Mamsch - Wed Apr 14 12:01:31 EDT 2010

The part on "how to create a custom menu item " in DOORS is a little bit hidden in the DXL help under "DOORS Window Control / The DXL Library and Addins menus ". You can have a look there, and if you still have any problems check back here.

Note: For creating menus in the DOORS explorer you need to use projectaddins instead of addins!

Regards, Mathias

Re: How to create a self defined menu on the main Doors menu
Mathias Mamsch - Wed Apr 14 12:04:23 EDT 2010

Mathias Mamsch - Wed Apr 14 12:01:31 EDT 2010
The part on "how to create a custom menu item " in DOORS is a little bit hidden in the DXL help under "DOORS Window Control / The DXL Library and Addins menus ". You can have a look there, and if you still have any problems check back here.

Note: For creating menus in the DOORS explorer you need to use projectaddins instead of addins!

Regards, Mathias

Ah I get where you might be struggeling: To get the currently selected item from the DOORS explorer use the "Item getSelectedItem()" function.

Regards, Mathias

Re: How to create a self defined menu on the main Doors menu
Aven_HIT - Thu Apr 15 11:37:16 EDT 2010

Mathias Mamsch - Wed Apr 14 12:01:31 EDT 2010
The part on "how to create a custom menu item " in DOORS is a little bit hidden in the DXL help under "DOORS Window Control / The DXL Library and Addins menus ". You can have a look there, and if you still have any problems check back here.

Note: For creating menus in the DOORS explorer you need to use projectaddins instead of addins!

Regards, Mathias

Thanks for your kindly help, I'll try it instantly, your "Note" is the one I eagerly need, and the function will save much time for me.
Thanks!

Sincerely, Aven

Re: How to create a self defined menu on the main Doors menu
Aven_HIT - Fri Apr 16 11:26:53 EDT 2010

Mathias Mamsch - Wed Apr 14 12:04:23 EDT 2010
Ah I get where you might be struggeling: To get the currently selected item from the DOORS explorer use the "Item getSelectedItem()" function.

Regards, Mathias

Hi, Mathias

I still couln't realize it.

Here are my operations, please give me some more suggestions,

I create two folders and make the path " $DOORSHOME/lib/dxl/projectaddins/myFunction/ " available

Under the folder "projectaddins", there are two files, they are named with "projectaddins.idx" and "projectaddins.hlp" respectively.

Under the folder "myFunction", there are three files, they are named with "myFunction.idx", "myFunction.hlp" and "myFunction.dxl" separately.

Then, I login, unfortunately, none new menu was displayed on the main DOORS explorer.

After I look up other addins, e.g. "Rational Publish Engine", I found out that it seems the ".inc" file plays an important role to let self-defined menu display on the main DOORS explorer, however, I can't open the ".inc" file.

Looking for your help and best wishes.

Sincerely, Aven

Re: How to create a self defined menu on the main Doors menu
Aven_HIT - Fri Apr 16 11:29:09 EDT 2010

Tried the suggestions, still couldn't achieve my goal

Re: How to create a self defined menu on the main Doors menu
Mathias Mamsch - Fri Apr 16 14:21:03 EDT 2010

Aven_HIT - Fri Apr 16 11:29:09 EDT 2010
Tried the suggestions, still couldn't achieve my goal

Ok a short walkthrough:

1. Create a Directory for your plugins (for example c:\DXL)
2. In the plugin directory create a file that is named exactly like the directory with the extension ".hlp" (for example: DXL.hlp). Watch out for correct casing.
3. In the plugin directory create a directory for your menu scripts (for example: MyMenu)
4. In this directory create a file that is named exactly like the directory with the extension ".hlp" (for example: MyMenu.hlp)
5. In the menu directory create a script for the menu. Make sure there are the two comments in there (for example myscript.dxl:

// 
/*
*/
ack "Hallo"

 


Until now it is the same like for a custom menu item in the module editor. No do ONE of the following:

6.a) Go to your registry to HKLM\Software\Telelogic\DOORS\<version>\config and add a string value called projectaddins with the value of your plugin directory (example: C:\DXL). Then start your DOORS client.

OR

6 b) start DOORS setting the projectaddins path with the parameter J:

doors.exe -J "C:\DXL"

In both cases you should now have a menu item MyMenu in your DOORS explorer with a script called myscript.dxl (or whatever values you chose)

Hope this helps, regards, Mathias

 

Re: How to create a self defined menu on the main Doors menu
Aven_HIT - Sat Apr 17 10:41:22 EDT 2010

Mathias Mamsch - Fri Apr 16 14:21:03 EDT 2010

Ok a short walkthrough:

1. Create a Directory for your plugins (for example c:\DXL)
2. In the plugin directory create a file that is named exactly like the directory with the extension ".hlp" (for example: DXL.hlp). Watch out for correct casing.
3. In the plugin directory create a directory for your menu scripts (for example: MyMenu)
4. In this directory create a file that is named exactly like the directory with the extension ".hlp" (for example: MyMenu.hlp)
5. In the menu directory create a script for the menu. Make sure there are the two comments in there (for example myscript.dxl:

// 
/*
*/
ack "Hallo"

 


Until now it is the same like for a custom menu item in the module editor. No do ONE of the following:

6.a) Go to your registry to HKLM\Software\Telelogic\DOORS\<version>\config and add a string value called projectaddins with the value of your plugin directory (example: C:\DXL). Then start your DOORS client.

OR

6 b) start DOORS setting the projectaddins path with the parameter J:

doors.exe -J "C:\DXL"

In both cases you should now have a menu item MyMenu in your DOORS explorer with a script called myscript.dxl (or whatever values you chose)

Hope this helps, regards, Mathias

 

Hi, Mathias

Great thanks to u for your so kindly help. I'll try it at once, thank you, thank you!

Sincerely, Aven

Re: How to create a self defined menu on the main Doors menu
Aven_HIT - Sun Apr 18 09:53:35 EDT 2010

Mathias Mamsch - Fri Apr 16 14:21:03 EDT 2010

Ok a short walkthrough:

1. Create a Directory for your plugins (for example c:\DXL)
2. In the plugin directory create a file that is named exactly like the directory with the extension ".hlp" (for example: DXL.hlp). Watch out for correct casing.
3. In the plugin directory create a directory for your menu scripts (for example: MyMenu)
4. In this directory create a file that is named exactly like the directory with the extension ".hlp" (for example: MyMenu.hlp)
5. In the menu directory create a script for the menu. Make sure there are the two comments in there (for example myscript.dxl:

// 
/*
*/
ack "Hallo"

 


Until now it is the same like for a custom menu item in the module editor. No do ONE of the following:

6.a) Go to your registry to HKLM\Software\Telelogic\DOORS\<version>\config and add a string value called projectaddins with the value of your plugin directory (example: C:\DXL). Then start your DOORS client.

OR

6 b) start DOORS setting the projectaddins path with the parameter J:

doors.exe -J "C:\DXL"

In both cases you should now have a menu item MyMenu in your DOORS explorer with a script called myscript.dxl (or whatever values you chose)

Hope this helps, regards, Mathias

 

Hi, Mathias

Through your kindly help, I realize it, very much thanks.

In addtion, I want to know the following way you adviced

start DOORS setting the projectaddins path with the parameter J:

doors.exe -J "C:\DXL"

Where should I run it?

Sincerely, Aven

Re: How to create a self defined menu on the main Doors menu
Mathias Mamsch - Sun Apr 18 10:54:30 EDT 2010

Aven_HIT - Sun Apr 18 09:53:35 EDT 2010
Hi, Mathias

Through your kindly help, I realize it, very much thanks.

In addtion, I want to know the following way you adviced

start DOORS setting the projectaddins path with the parameter J:

doors.exe -J "C:\DXL"

Where should I run it?

Sincerely, Aven

That depends. Normally you would want other people to have the that menu item. Using the registry you would have to do changes on the client PC and you will have problems, if the users use different plugin environments (different menus) all the time.

So the way we usually do it, is provide the users with a shortcut, that we put in some network path. This shortcut usually looks like:

%PROGRAMFILES%\Telelogic\DOORSxy\bin\doors.exe -d <server-data> -a "<somepath>" -J "<some other path>"

This way you can provide multiple plugin environments on different servers to the users without changing their clients all the time. The disadvantage of that approach is, that you will never know which include files the user has available, so errors in DXL attributes and triggers might happen.

If you can have one DXL script plugin path for the whole company I suggest you go with the registry, since this way you can make sure, the users will have all the include files for your modules available.

If you don't know how to create a shortcut, or cannot find your DOORS.EXE file you might need to contact your IT-Support.

Regards, Mathias

Re: How to create a self defined menu on the main Doors menu
Aven_HIT - Mon Apr 19 10:46:35 EDT 2010

Mathias Mamsch - Sun Apr 18 10:54:30 EDT 2010
That depends. Normally you would want other people to have the that menu item. Using the registry you would have to do changes on the client PC and you will have problems, if the users use different plugin environments (different menus) all the time.

So the way we usually do it, is provide the users with a shortcut, that we put in some network path. This shortcut usually looks like:

%PROGRAMFILES%\Telelogic\DOORSxy\bin\doors.exe -d <server-data> -a "<somepath>" -J "<some other path>"

This way you can provide multiple plugin environments on different servers to the users without changing their clients all the time. The disadvantage of that approach is, that you will never know which include files the user has available, so errors in DXL attributes and triggers might happen.

If you can have one DXL script plugin path for the whole company I suggest you go with the registry, since this way you can make sure, the users will have all the include files for your modules available.

If you don't know how to create a shortcut, or cannot find your DOORS.EXE file you might need to contact your IT-Support.

Regards, Mathias

Hi, Mathias

With your patient interpretion, I got the two way you provided to implement self-defined menu on the main DOORS explorer.

Greate thanks and best wishes!

Sincerely, Aven

Re: How to create a self defined menu on the main Doors menu
izzo - Thu Mar 31 09:01:31 EDT 2011

Mathias Mamsch - Fri Apr 16 14:21:03 EDT 2010

Ok a short walkthrough:

1. Create a Directory for your plugins (for example c:\DXL)
2. In the plugin directory create a file that is named exactly like the directory with the extension ".hlp" (for example: DXL.hlp). Watch out for correct casing.
3. In the plugin directory create a directory for your menu scripts (for example: MyMenu)
4. In this directory create a file that is named exactly like the directory with the extension ".hlp" (for example: MyMenu.hlp)
5. In the menu directory create a script for the menu. Make sure there are the two comments in there (for example myscript.dxl:

// 
/*
*/
ack "Hallo"

 


Until now it is the same like for a custom menu item in the module editor. No do ONE of the following:

6.a) Go to your registry to HKLM\Software\Telelogic\DOORS\<version>\config and add a string value called projectaddins with the value of your plugin directory (example: C:\DXL). Then start your DOORS client.

OR

6 b) start DOORS setting the projectaddins path with the parameter J:

doors.exe -J "C:\DXL"

In both cases you should now have a menu item MyMenu in your DOORS explorer with a script called myscript.dxl (or whatever values you chose)

Hope this helps, regards, Mathias

 

HEllo Mat

I was looking at your answer concerning adding functions to project.

I do not have the projectaddins so do I have to create it ?

.a) Go to your registry to HKLM\Software\Telelogic\DOORS\<version>\config and add a string value called projectaddins with the value of your plugin directory (example: C:\DXL). Then start your DOORS client.

Where you put that string exactly ??? Dont need a specific file ?

Re: How to create a self defined menu on the main Doors menu
Mathias Mamsch - Thu Mar 31 09:20:34 EDT 2011

izzo - Thu Mar 31 09:01:31 EDT 2011
HEllo Mat

I was looking at your answer concerning adding functions to project.

I do not have the projectaddins so do I have to create it ?

.a) Go to your registry to HKLM\Software\Telelogic\DOORS\<version>\config and add a string value called projectaddins with the value of your plugin directory (example: C:\DXL). Then start your DOORS client.

Where you put that string exactly ??? Dont need a specific file ?

Hmm ... don't you know the windows registry? The one you edit using regedit.exe ? See here for a quick tutorial in registry editing, and reread the posts with that knowledge ... Hope that helps, Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: How to create a self defined menu on the main Doors menu
llandale - Thu Mar 31 12:49:46 EDT 2011

Mathias Mamsch - Thu Mar 31 09:20:34 EDT 2011
Hmm ... don't you know the windows registry? The one you edit using regedit.exe ? See here for a quick tutorial in registry editing, and reread the posts with that knowledge ... Hope that helps, Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

I think it ill-advised to point typical mortals to the Registry for editing purposes; since the Registry is so delicate and one fat-finged mistake can easily prevent the computer or program from ever running again.

You can add DOORS variables to your DOORS registry, using DXL in DOORS:

setenv("DOORSPROJECTADDINS", "c:\\DXL")

Take the variable name "ProjectAddins", convert to all upper case characters, and suffix with "DOORS".

Also try to erase it:
setenv("DOORSPROJECTADDINS", "")

  • Louie

Re: How to create a self defined menu on the main Doors menu
Mathias Mamsch - Thu Mar 31 14:51:22 EDT 2011

llandale - Thu Mar 31 12:49:46 EDT 2011
I think it ill-advised to point typical mortals to the Registry for editing purposes; since the Registry is so delicate and one fat-finged mistake can easily prevent the computer or program from ever running again.

You can add DOORS variables to your DOORS registry, using DXL in DOORS:

setenv("DOORSPROJECTADDINS", "c:\\DXL")

Take the variable name "ProjectAddins", convert to all upper case characters, and suffix with "DOORS".

Also try to erase it:
setenv("DOORSPROJECTADDINS", "")

  • Louie

Louie, I tend to believe that you are seeing a lot of possibly loaded guns lying around from time to time. You can use a fork to seriously hurt someone too, even a spoon. I think it is never a bad thing to look beyond the end of your nose, even if you risk to learn something by it the hard way. Anyway:

Putting those values to your registry by DXL is however a nice idea, one addition:

setenv("PROJECTADDINS", "...") will put the values to HKEY_CURRENT_USER, i.e. it will put the values for the current user only. setenv("PROJECTADDINS", "") will not delete the key, but just write an empty string, so it seems to me you cannot go back to the default values for all users like this, but need to delete the registry key. This might be a problem, if you override your companies settings by this method, which are usually installed for all users.

Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: How to create a self defined menu on the main Doors menu
llandale - Fri Apr 01 11:56:04 EDT 2011

Mathias Mamsch - Thu Mar 31 14:51:22 EDT 2011
Louie, I tend to believe that you are seeing a lot of possibly loaded guns lying around from time to time. You can use a fork to seriously hurt someone too, even a spoon. I think it is never a bad thing to look beyond the end of your nose, even if you risk to learn something by it the hard way. Anyway:

Putting those values to your registry by DXL is however a nice idea, one addition:

setenv("PROJECTADDINS", "...") will put the values to HKEY_CURRENT_USER, i.e. it will put the values for the current user only. setenv("PROJECTADDINS", "") will not delete the key, but just write an empty string, so it seems to me you cannot go back to the default values for all users like this, but need to delete the registry key. This might be a problem, if you override your companies settings by this method, which are usually installed for all users.

Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

True, maybe I see lots of unloaded guns; but that's because I have been shot at by one. I'd like to point out its practically impossible to accidentally kill or permanantly maim yourself or someone else with a fork or spoon, they thus don't deserve the respect of an unloaded gun. The Registry however does; since an accidental fat-fingered mistake can be very serious. And indeed I've done that as well, but don't tell my Brother it was me...

Yes, using "setenv" does not delete the value but it erases it in the HLCU area, and DOORS will then use the HKLM value. Try this:

print "OLE: " (getenv("oleopenlimit")) "\n"  // prints "5"
setenv("DOORSOLEOPENLIMIT", "1")
ack("Start another instance of DOORS, notice its limit is 1.  Then ack this message.")
setenv("DOORSOLEOPENLIMIT", "")
ack("Start another instance of DOORS, notice its limit is back to 5")

 

 

  • Louie

 

 

Re: How to create a self defined menu on the main Doors menu
izzo - Mon Apr 04 08:40:45 EDT 2011

Mathias Mamsch - Thu Mar 31 14:51:22 EDT 2011
Louie, I tend to believe that you are seeing a lot of possibly loaded guns lying around from time to time. You can use a fork to seriously hurt someone too, even a spoon. I think it is never a bad thing to look beyond the end of your nose, even if you risk to learn something by it the hard way. Anyway:

Putting those values to your registry by DXL is however a nice idea, one addition:

setenv("PROJECTADDINS", "...") will put the values to HKEY_CURRENT_USER, i.e. it will put the values for the current user only. setenv("PROJECTADDINS", "") will not delete the key, but just write an empty string, so it seems to me you cannot go back to the default values for all users like this, but need to delete the registry key. This might be a problem, if you override your companies settings by this method, which are usually installed for all users.

Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Hey, Wow, This is beyond me, isnt another way to do it without editing the registry ???

Re: How to create a self defined menu on the main Doors menu
SystemAdmin - Thu Jan 12 22:39:11 EST 2012

Mathias Mamsch - Thu Mar 31 14:51:22 EDT 2011
Louie, I tend to believe that you are seeing a lot of possibly loaded guns lying around from time to time. You can use a fork to seriously hurt someone too, even a spoon. I think it is never a bad thing to look beyond the end of your nose, even if you risk to learn something by it the hard way. Anyway:

Putting those values to your registry by DXL is however a nice idea, one addition:

setenv("PROJECTADDINS", "...") will put the values to HKEY_CURRENT_USER, i.e. it will put the values for the current user only. setenv("PROJECTADDINS", "") will not delete the key, but just write an empty string, so it seems to me you cannot go back to the default values for all users like this, but need to delete the registry key. This might be a problem, if you override your companies settings by this method, which are usually installed for all users.

Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Hello,

Would you recommend creating a master Registry and make a acrchive so that I can have individuals configure their current Registry? One reason I would like to do this is our network often has DNS issues and I would like to replace all server names will actual IP addresses and configure project/addins, etc.

DOS Commands
REGEDIT /E c:\DOORS.REG "HKEY_LOCAL_MACHINE\SOFTWARE\Telelogic\DOORS\9.3\Config"
REGEDIT /S c:\DOORS.REG

Thank you,
Jim

Re: How to create a self defined menu on the main Doors menu
SystemAdmin - Fri Jan 13 10:38:55 EST 2012

SystemAdmin - Thu Jan 12 22:39:11 EST 2012
Hello,

Would you recommend creating a master Registry and make a acrchive so that I can have individuals configure their current Registry? One reason I would like to do this is our network often has DNS issues and I would like to replace all server names will actual IP addresses and configure project/addins, etc.

DOS Commands
REGEDIT /E c:\DOORS.REG "HKEY_LOCAL_MACHINE\SOFTWARE\Telelogic\DOORS\9.3\Config"
REGEDIT /S c:\DOORS.REG

Thank you,
Jim

Hello,

I am trying to get a custom Menu to run a encrypted dxl file but I am unable to access the script when it is encrypted but when I don't encrypt it I am able to execute the script what am I going wrong? Attached is my configuration file.

-Jim

Re: How to create a self defined menu on the main Doors menu
rain_bow - Mon Jan 16 08:03:11 EST 2012

SystemAdmin - Fri Jan 13 10:38:55 EST 2012
Hello,

I am trying to get a custom Menu to run a encrypted dxl file but I am unable to access the script when it is encrypted but when I don't encrypt it I am able to execute the script what am I going wrong? Attached is my configuration file.

-Jim

An encrypted script has to be included the #include statement -- Don't know of any exceptions.

Re: How to create a self defined menu on the main Doors menu
llandale - Mon Jan 16 13:17:33 EST 2012

rain_bow - Mon Jan 16 08:03:11 EST 2012
An encrypted script has to be included the #include statement -- Don't know of any exceptions.

yes. The encrypted file generally has a companion unencrypted *.dxl file that looks like this:
// bla bla bla
/*
bla bla bla
*/
#include <wherever/BlaBla.inc>

Where "bla bla bla" is generally the same as in the encrypted file before you encrypted it.

This DXL file goes in the menus, it really doesn't matter where you put the encrypted files.

-Louie

Re: How to create a self defined menu on the main Doors menu
SystemAdmin - Wed Feb 27 00:56:25 EST 2013

Mathias Mamsch - Thu Mar 31 14:51:22 EDT 2011
Louie, I tend to believe that you are seeing a lot of possibly loaded guns lying around from time to time. You can use a fork to seriously hurt someone too, even a spoon. I think it is never a bad thing to look beyond the end of your nose, even if you risk to learn something by it the hard way. Anyway:

Putting those values to your registry by DXL is however a nice idea, one addition:

setenv("PROJECTADDINS", "...") will put the values to HKEY_CURRENT_USER, i.e. it will put the values for the current user only. setenv("PROJECTADDINS", "") will not delete the key, but just write an empty string, so it seems to me you cannot go back to the default values for all users like this, but need to delete the registry key. This might be a problem, if you override your companies settings by this method, which are usually installed for all users.

Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Hello ,

I followed this thread. I have a query on this.

My query is How can the particular user can only view the menu and able to run the script in it.(For eg: It should check for Username: SBalasubrama,then the particular person can only run it)

Can any one please help my query?

-Shriraam

Re: How to create a self defined menu on the main Doors menu
Mathias Mamsch - Wed Feb 27 10:15:19 EST 2013

SystemAdmin - Wed Feb 27 00:56:25 EST 2013
Hello ,

I followed this thread. I have a query on this.

My query is How can the particular user can only view the menu and able to run the script in it.(For eg: It should check for Username: SBalasubrama,then the particular person can only run it)

Can any one please help my query?

-Shriraam

Please use the search function, before pulling those old threads. You can suppose that this question is also already answered here. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS