<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=445056146107513&amp;ev=PageView&amp;noscript=1">

AutoCAD® Electrical: Custom Company & User Icon Menus

Rick France

If you have ever taken a class from me, had me setup your system, or even read any of my AutoCAD® Electrical articles in the past, then you know that I am a very big proponent of keeping all of my customization separate from the out-of-the-box content. This includes Icon Menus.

While this article may appear to be a rehash of something you can easily find all over the internet, I’m going to be taking a different angle on the subject. I have recently had two different questions regarding this issue, and have developed two solutions based on the experience I have gained in my years as a CAD Manager.
First, I have a client who wanted to use a custom icon menu, but he also used multiple standards from project to project which included JIC, NFPA and IEEE. He wanted to use a single Company Schematic Icon Menu and a single Company Panel Icon Menu for all three standards. The problem he was running into, based on all of the aforementioned internet solutions, was that he either had to have three custom menus for each standard or three separate links in his custom menu that would return him to three different ACE standards. If he went with three separate menus and made a change, he had to do it three times. If he went with three separate links, then he was dependent on each user returning to the correct standard. Neither solution was desirable.

In a second request, the client wanted to have a user icon menu that was unique to each user in the company, in addition to a company icon menu. This was so each user could develop tools that they felt were beneficial to their work, without jeopardizing the integrity of the official company icon menus or any other users menu for that matter.

In this article we are going to show you how to accomplish both. In order to do this, we will not assume that you the reader have already found out how to create a secondary icon menu from some other article and I will make this a one stop article from square one with a default install of AutoCAD Electrical and how I would set this up myself. We will begin by setting up your support paths in AutoCAD and one simple change in the wd.env file that each user accesses. (I am going to assume you have multiple people in your company that are going to be using these icon menus and I want you to make these changes just once on your network for all users.)

Pay Attention To What’s Behind The Curtain

If you do not have a location on your network already you will need to create a folder for it and map it to a drive that each user’s computer can access. I have a folder on my network that is mapped as an “S:\” drive, and the Icon Menus are located at “S:\Company Data\Icon Menu”. Also, create a folder to use for your wd.env file on the network so that everyone can use the same one. Mine will be in “S:\Company Data\Support”.

Location

Next, locate the icon menus and related files on your hard drive and copy them to this folder. The icon menus are “dat” files. These files, as well as the related “dll” files in a default install, are located at:

C:\Users\<UserName>\AppData\Roaming\Autodesk\AutoCAD Electrical 2015\R20.0\enu\Support

For the sake of this article we will stick with the JIC, NFPA and IEEE standards. For these standards you will want to copy the following files into your network location. In my case, I will place them in “S:\Company Data\Icon Menu”.

  JIC: ACE_JIC_MENU.DAT ACE_PANEL_MENU.DAT s1.dll s2.dll
  NFPA: ACE_NFPA_MENU.DAT ACE_PANEL_MENU_NFPA.DAT NFPA.dll s2.dll
  IEEE: ACE_IEEE_MENU.DAT ACE_PANEL_MENU_IEEE.DAT ieee.dll  

You will also need a sub folder for your icon images named “Images”. Using the example of my computer, I created a folder named “S:\Company Data\Icon Menu\Images”. In this folder I have placed three “png” images but they could be jpeg’s, gif’s, bmp’s, etc. The three image files I created and use are named “AcadE.png” (AutoCAD Logo), “User.png” (I found on the internet) and “Vandelay.png” (my make believe company logo and the makers of fine latex). I recommend images that are between 128 and 400 pixels maximum resolution.

Electrical

In order to edit the icon menu files inside of AutoCAD Electrical, they must exist on our hard drive. Using Windows Explorer, right click in the Icon Menu folder and create a New Text Document.

Electrical

Rename the new text document “<CompanyName>_Schematic.dat”, or in my case “Vandelay_Schematic.dat”. If prompted to change the file extension, answer “Yes” because the file extension needs to be “dat” NOT “txt”.

SchematicOpen this new dat file using notepad and add these three lines:

**MO
DO
Vandelay: Schematic Symbols

(Of course you want to use your company name in place of Vandelay.)

Save, exit, copy your new dat file, and paste it in the same folder. Rename the copy “<CompanyName>_Panel.dat”, or in my case, “Vandelay_Panel.dat”. Open this file in notepad and change the third line from “Vandelay: Schematic Symbols” to “Vandelay: Panel Layout” and save the file. Again, you want to use your company name instead of Vandelay.

For the User Icon Menu, we need to setup a location on your network that contains a folder for every user of AutoCAD Electrical. Each folder name needs to be the user’s Windows login name on their computer. On my network each user’s login name is there FirstLast name without spaces. I have set this up as a mapped drive using “U:\” ,which looks like this:

Electrical

Lastly, copy “<CompanyName>_Schematic.dat” or in my case “Vandelay_Schematic.dat” from the Icon Menu folder into your login name folder and rename it to “User_IconMenu.dat”. Open this file and change the line “Vandelay: Schematic Symbols” to “User Icon Menu” and save the file. Also create a sub-folder named “Images”.

Electrical

Next, inside AutoCAD Electrical you will want to tell the software where it will find the Icon Menus. Begin by setting up the Support File Search Path. With ACE open, go to Options, which you can find in the bottom right hand corner of the Application Menu (the big red “A” in the upper right corner). You can also right click in the drawing (not on an object) and select “Options”. In the Options dialogue box on the “Files” tab, expand “Support File Search Path” and click on “Add”. Immediately click on “Browse” and locate your network path, then click OK and use the “Move Up” button to move it to the top of the food chain as I have done in the image below. Repeat the process to add the Support folder we created, and then click “OK” to save and exit the Options.

Electrical

NOTE: You will need to setup the Support File Search Path on each user’s computer.

Next, we need to exit AutoCAD again in order to make a change to your environment file. In a default installation you will find the wd.env file located in “My Documents” in “\Acade 2015\AeData\”. Move this file from this location to the Support folder you created on the network. You will also want to delete this file from every user’s computer. If you are not sure you trust me quite yet then just rename it to something like wd.env.bak. If this file exists on the user’s computer, ACE will find it and use it. If it doesn’t exist on the user’s computer then it will find the one on the network in the Support File Search Path we set above in Options.

This is an ASCII Text file, so open the wd.env file that you placed on your network using Notepad. In notepad, locate the line that contains the text WD_ACADPATHFIRST. In a default install it will be preceded by an asterisk, which makes the software ignore it. Activate it by simply removing the asterisk so that it reads as follows:

WD_ACADPATHFIRST,1,if 1 then check ACAD path first before AutoCAD Electrical paths

Save and close the file. Now we are ready to create the links from menu to menu.

There’s No Place Like Home

Beginning with a JIC Project on the schematic or Panel Tab in AutoCAD Electrical, select the Icon Menu Wizard on the Other Tools Panel.

ElectricalIn the Select Menu file dialogue box, select “Browse” and confirm that you are in the correct folder created above. You will see all the dat files, including the Company ones we created. If they are not there and it is still looking at the local drive, then something has not been setup right and you need to go back and review all the above settings. If it is looking at the correct location, select Cancel. Back in the Select Menu File, if ACE_JIC_MENU.DAT is not in the box, click Schematic and then OK.

Electrical

In the Icon Menu Wizard, select “Command”. In the “Add Icon – Command” dialogue box set the following:

Name: Vandelay (Your Company Name)
Image File: Browse and select your company logo in the Images folder
Command: (c:wd_loadmenu "Vandelay_Schematic.dat")(c:wd_insym_dlg)(c:wd_loadmenu "”)

Electrical

Type the command exactly like it is shown with the exception of the name of your Schematic dat file. These are LISP routines that basically load your menu (c:wd_loadmenu), then execute the loaded schematic icon menu (c:wd_insym_dlg). Lastly, it resets it to the original icon menu (c:wd_loadmenu "”) so that ACE doesn’t get stuck on your menu, (a known issue with the wd_loadmenu command and resetting it in this manner resolves that issue).

Click OK and repeat the process, adding a second command to access the user icon menu. To do this, enter the name as “User”, browse, and select your user icon image in the Images folder. For the command, enter:

(c:wd_loadmenu (strcat "U:\\" (getvar "loginname") "\\User_IconMenu.dat"))(c:wd_insym_go2menu 100)(c:wd_loadmenu "")

In the “strcat” portion replace the “U\\” with the drive that you have setup. For this, we are using the LISP command (c:wd_insym_go2menu 100) with the option “100”. Remember this, for when we setup the User Menu, if yours uses a different number, you will need to change it. I will point this out later when it is generated.

Electrical

In the Icon Menu Wizard, you can move the new commands anywhere you like by dragging and dropping them. I always put mine first right before the Push Buttons.

Electrical

Click OK to save and exit. Feel free to test the “Company” one with the Icon Menu on the Schematic tab. We have not created the return link yet, and the “User” command is not complete so you’ll get an error message at this time.

Now let’s set up the JIC Panel Icon Menu. Don’t jump ahead with the same commands as the schematics because the commands will be different for Panels. This time in the Select Menu file dialogue box, select “Panel” and then OK.

Electrical

Add a Command and the name will still be your company name and Image will still browse to your company logo, however the command will read as follows for the panels:

(c:wd_use_menu "Vandelay_Panel.dat")(c:wd_do_psym_in)

Electrical

Add the “User” Command exactly like we did before with the exception of the go2menu option being “101” this time.

(c:wd_loadmenu (strcat "U:\\" (getvar "loginname") "\\User_IconMenu.dat"))(c:wd_insym_go2menu 101)(c:wd_loadmenu "")

Electrical

Arrange the icons where you want them and then select OK to save and exit.

Electrical

Now let’s set up the return link in the Company Schematic Icon Menu. Open the file by selecting “Browse”, and click the file name TWICE. Once you have it, click OK.

Electrical

Now, we will add two new Commands. The first will be the return to the original icon menu. We do not want to hard code the menu name because we want it to retrieve the default menu for the project, whether it is JIC, NFPA or IEEE or any other standard you might be using. To do this, add the Command as you did before, but name it “AutoCAD Electrical”. Browse and select your icon image “AcadE.png” and for the command, enter the following:

(c:wd_loadmenu (nth 2 (nth 4 (c:wd_proj_wdp_data))))(c:wd_insym_go2menu 0)(c:wd_loadmenu "")

Electrical

For this we are using a command named (c:wd_proj_wdp_data) to retrieve the data from the active project “wdp” file, which will return several lists. The 2nd item in the 4th list is the name of the default schematic icon menu used by the active project. That will resolve the first issue mentioned at the beginning of the article.

Next, add the exact same User Command we added to the Schematic Icon Menu, which uses the “100” option.

(c:wd_loadmenu (strcat "U:\\" (getvar "loginname") "\\User_IconMenu.dat"))(c:wd_insym_go2menu 100)(c:wd_loadmenu "")

Electrical

Repeat the process for the Company Panel Icon Menu, but this time we need to draw the 4th item from the 4th list so the command reads like this:

(c:wd_loadmenu (nth 4 (nth 4 (c:wd_proj_wdp_data))))(c:wd_insym_go2menu 0)(c:wd_loadmenu "")

Electrical

The User Icon uses the option “101”.

(c:wd_loadmenu (strcat "U:\\" (getvar "loginname") "\\User_IconMenu.dat"))(c:wd_insym_go2menu 101)(c:wd_loadmenu "")

Electrical

After you have saved and exited the Icon wizard via the “OK” button, you are ready to complete the process with the User Icon Menus. This time you will need to browse outside of the folder it is looking at, and select the “User_IconMenu.dat” file that we created under your login name folder.

Electrical

Here we are going to use one dat file for both Schematics and Panels. We will first create two Submenus.

Electrical

The first submenu I will name “Schematic”. I will simply let it use the default image for the submenu. Note the “Menu number”, which should be “100”. If yours happens to be different, then you need to change the “100” options above in both Schematic Menus to the Menu number below OR change the one in the dat file once we are done here to “M100” using Notepad – whichever you feel more comfortable with.

Electrical

Create a second New submenu named Panels and confirm that the Menu number is 101.

Electrical

Double click “Schematic” and add the commands just as before for returning to the ACE Schematic menu and going to the Company schematic menu. Here are the commands as a reminder and the images will look the same as before:

To AutoCAD Schematic Menu:

(c:wd_loadmenu (nth 2 (nth 4 (c:wd_proj_wdp_data))))(c:wd_insym_go2menu 0)(c:wd_loadmenu "")

To Company Schematic Menu:

(c:wd_loadmenu "Vandelay_Schematic.dat")(c:wd_insym_dlg)(c:wd_loadmenu "”)

Go to the Panels submenu, and add the commands to go to the ACE Panel Menu and the Company Panel Menu just as before. If you get an “Image already exists” message, just say “Yes”.

To AutoCAD Panel Menu:

(c:wd_loadmenu (nth 4 (nth 4 (c:wd_proj_wdp_data))))(c:wd_insym_go2menu 0)(c:wd_loadmenu "")

To Company Panel Menu:

(c:wd_use_menu "Vandelay_Panel.dat")(c:wd_do_psym_in)

Close and exit the Icon Menu.

If you use the Icon Menu from the Schematic tab, you should be able to easily go between the customized out-of-the-box menu to the company menu and the User menu. Note that the User menu is going to the links in the Schematic submenu. If you switch the Panel tab’s Icon Menu it goes to the links in the Panel submenu.

For the grand finale we need to exit out of AutoCAD and return to Windows Explorer. To add the links to the out of the box IEEE menu and the out of the box NFPA menu – open up the ACE_JIC_MENU.DAT file in Notepad – locate the company and user lines under the **MO Menu, highlight the entire lines and copy them to your clipboard. Then open the ACE_IEEE_MENU.DAT and paste them into the same location in that file. Finally, paste the lines into the ACE_NFPA_MENU.DAT.

Repeat the process by copying from ACE_PANEL_MENU.DAT and into both ACE_PANEL_MENU_IEEE.DAT and ACE_PANEL_MENU_NFPA.DAT.

Lastly, go to your login name folder and copy the file User_IconMenu.dat and the folder Images. Paste them into every user’s login name folder in your entire company so that each user has a working menu to customize at will and you are ready to go with your company menus as well.

This appears to be a very long process but it really is not. There is so much copy and paste involved that it can all be setup in about a half hour to an hour tops.

One additional side note: When you upgrade to a new version of AutoCAD Electrical, check the default menu dat files in the new version for changes. Autodesk keeps really good revision notes in each dat file, so look for a change. If there was no revision in the dat files, you need do nothing. If there was, however, just rename and copy your dat files and their dll files to your network. Using notepad, copy the company and user lines to the new versions, just as you did to the IEEE and NFPA dat files above. I would also suggest copying the wd.env file, from the new version, to your network and activating the ACADPATHFIRST line in it. Delete the wd.env file on each user’s computer.

The only other thing you will need to do in the new version is setup the Support File Search Path on each computer, which can be done via a deployment. You are now fully migrated and ready to go in the new version.

For more information, visit our AutoCAD Electrical page or click the button below to have someone contact you.

I'd like more information.

 

Comments