Custom Icon menu

Custom Icon menu

Anonymous
Not applicable
4,129 Views
12 Replies
Message 1 of 13

Custom Icon menu

Anonymous
Not applicable

Hello,

 

I am trying to create a custom icon menu that you can access from the default icon menu. I would also like to be able to return to the default menu from my custom menu. These menus are to be shared among the office and kept on a centralized network.

What I have done:

1) Created a folder on the network that contains my two .dat files - ACE_JIC_MENU.dat and my_custom_menu.dat - along with the symbol libraries

2) I have moved the wd.env file to a location on the network and removed from my local machine.

3) I have added these locations to the top of my Support file Search Path within ACADE Options.

4) I have added the following line to my ACE_JIC_MENU.dat file

 

                    Celco Symbols|IMAGES\Celco_Mark.png|$C=(c:wd_loadmenu "celco_schematic.dat")(c:wd_insym_dlg)(c:wd_loadmenu "”)

 

5) I have added the following line to my custom.dat file:

 

                    Default|IMAGES\acad.PNG|$C=(c:wd_loadmenu "ACE_JIC_MENU.DAT")(c:wd_insym_go2menu 0)(c:wd_loadmenu "”)

 

Now what happens is:

 

1) Open an ACADE project and select the Icon Menu button. The command line shows that ACADE is reading the correct ACE_JIC_MENU.DAT location.

2) The default menu appears along with a button that will take me to my custom menu.

3) I press the custom button and I am taken to my custom menu. Again, the command line shows I am reading the correct location.

4) On the custom menu a button appears that is labeled 'Default' and has the corresponding image.

4) When I click this default button the icon menu will close and the following appears in the command line:

 

                   C:/Users/bpeake/AppData/Roaming/Autodesk/AutoCAD Electrical 2017/R21.0/enu/Support/user/picked.scr
                   Command: ("_>

5) If I click back into the icon menu I am brought back to my custom menu.

6) If I click on 'default' once more I will return to the default menu and the command line will tell me ACADE is reading from the correct ACE_JIC_MENU.dat location.

 

It seems as if the first time I click default button the function will not finish running because I am unable to enter any other commands (Line for example) without hitting escape. When I hit escape the command line reads:

 

                    *Cancel*; error: function cancelled

 

Any ideas would be very helpful. Thanks a lot.

 

Brian

0 Likes
Accepted solutions (1)
4,130 Views
12 Replies
Replies (12)
Message 2 of 13

PatMurnen_Adsk
Alumni
Alumni
Accepted solution

Brian,

 

There is a Help topic that has steps to do this and the lines are somewhat different than what you show.

http://help.autodesk.com/view/ACAD_E/2017/ENU/?guid=GUID-2EB02BA2-48E7-4B65-B59B-A3223704AAE8

 

  1. Open the icon menu with a simple text editor.
  2. Add a line like this to menu .DAT file:

    Special menu|special_menu.sld|$C=(c:wd_loadmenu "{menu name}.dat")(c:wd_insym_go2menu 0)

  3. In your new {menu name}.dat file, add this line so you can switch back to AutoCAD Electrical's default menu:

    Default Electrical menu|back2wd.sld|$C=(c:wd_loadmenu "ACE_{standard}_menu.dat")(c:wd_insym_go2menu 0)

  4. In AutoCAD Electrical's default icon menu, select the new entry.

    Your menu immediately appears. When you want to go back to AutoCAD Electrical's default menu, select Default Electrical menu on your own special menu. AutoCAD Electrical immediately switches back to the AutoCAD Electrical default icon menus.

 

Also, it might just be a copy\paste issue in the post but some of your quotation marks look like they are from a word processor and not a text editor. make sure all quotation marks are simple ones from a text editor. This can throw off the code.

 

Please hit the Accept as Solution button if my post fully solves your issue, or reply with additional details if the problem persists.

 

Regards,

Pat Murnen

 

 



Pat Murnen
Principal Content Developer
Product Development – AutoCAD Product Line Group

Autodesk, Inc.

0 Likes
Message 3 of 13

Anonymous
Not applicable

Hi pat,

 

Thanks for your quick reply! I had followed that information from the help menu but I could not get it to work. I think that you are right about my quotation marks and my laziness must have got the better of me. I copy and pasted the text and when I took the time to type it out it seems to work fine!

 

Thanks a bunch.

 

Brian

0 Likes
Message 4 of 13

PatMurnen_Adsk
Alumni
Alumni

Brian,

 

Glad that worked. I will try what is in the Help topic and if it doesn't work as described I will log that to get the topic updated. Thanks for letting me know.

 

Regards,

Pat



Pat Murnen
Principal Content Developer
Product Development – AutoCAD Product Line Group

Autodesk, Inc.

0 Likes
Message 5 of 13

Anonymous
Not applicable

Pat,

 

I believe the help topic worked because that it was I just followed to make it work. I believe it was my quotations that were the problem. Either that or some other typing error.

 

Brian

0 Likes
Message 6 of 13

PatMurnen_Adsk
Alumni
Alumni

Brian,

 

Yeah, the quotation marks have tripped me up a number of times. I copy them from Word and AutoCAD doesn't like them. Anyway, glad things are working for you.

 

Regards,

Pat



Pat Murnen
Principal Content Developer
Product Development – AutoCAD Product Line Group

Autodesk, Inc.

Message 7 of 13

Anonymous
Not applicable

Hi,

 

Is this function supported by Electrical 2015?

0 Likes
Message 8 of 13

PatMurnen_Adsk
Alumni
Alumni

It looks like the same instructions are in the 2015 Help.

 

http://help.autodesk.com/view/ACAD_E/2015/ENU/?guid=GUID-2EB02BA2-48E7-4B65-B59B-A3223704AAE8

 

I don't have 2015 installed right now to try. Did you try it and run into issues?

 

Regards,

Pat Murnen



Pat Murnen
Principal Content Developer
Product Development – AutoCAD Product Line Group

Autodesk, Inc.

0 Likes
Message 9 of 13

Anonymous
Not applicable

How do I switch? Is there suppose to be a separate button for this?

I am using Vault, and the default icon menu are:

Schematic:

c:/data/_vault/acade data/parts library/ace_iec61082_menu.dat

Panel:

c:/data/_vault/acade data/parts library/ace_schematic_menu.dat

 

I have 2 custom files:

Schematic:

c:/data/_vault/acade data/parts library/measurement_schematic_menu.dat

Panel:

c:/data/_vault/acade data/parts library/measurement_panel_menu.dat

 

In ace_iec61082_menu.dat I have added:

Special menu|special_menu.sld|$C=(c:wd_loadmenu "MEASUREMENT_SCHEMATIC_MENU.dat")(c:wd_insym_go2menu 0)

In measurement_schematic_menu.dat I have added:

Default Electrical menu|back2wd.sld|$C=(c:wd_loadmenu "ACE_IEC61082_menu.dat")(c:wd_insym_go2menu 0)

 

Don't see any changes

 

Update:

Depends on where I paste the line:

I get unhandle exeption error if I paste it lik this:

Special menu|special_menu.sld|$C=(c:wd_loadmenu "MEASUREMENT_SCHEMATIC_MENU.dat")(c:wd_insym_go2menu 0)
; 04/06/2007 MHN Created
**M0
Push Buttons|IEC61082(s_pb)|$S=M3

...

..

Exeption error.png

Nothing happens if I do like this:

; 04/06/2007 MHN Created
**M0
Special menu|special_menu.sld|$C=(c:wd_loadmenu "MEASUREMENT_SCHEMATIC_MENU.dat")(c:wd_insym_go2menu 0)
Push Buttons|IEC61082(s_pb)|$S=M3
Selector Switches|IEC61082(s_ss)|$S=M6

 

0 Likes
Message 10 of 13

PatMurnen_Adsk
Alumni
Alumni

Hi,

 

Yes, the structure of the file is very important. You can see more about this in the Help topic, http://help.autodesk.com/view/ACAD_E/2015/ENU/?guid=GUID-E5A20D91-975E-4402-AA3C-29B43BAEAFFB

But, the first line for any menu page is the menu page number designator, something like **M0, then a legacy line that isn't used in more recent icon menus, then the next line is the title. So any lines added should go after those.

 

So to try this, using Notepad I opened my default menu which is ACE_JIC_MENU.DAT (located at ) and I added the special menu line as shown. My custom menu is a copy of the default one and I named it ACE_JIC_MENU_PAT.DAT. It should be placed in the same folder with the menu dat files supplied.

**M0
D0
JIC: Schematic Symbols
Special menu|special_menu.sld|$C=(c:wd_loadmenu "ACE_JIC_MENU_PAT.dat")(c:wd_insym_go2menu 0)
Push Buttons|s2(s_pb)|$S=M3

To see the change I did this while AutoCAD Electrical was not open. Then I opened AutoCAD Electrical and picked the Icon Menu command. This causes the menu file to be read. And I see this -

icon_menu_custom_button.png

My button for switching to my menu is a blank box because I don't actually have a special_menu.sld. I can use a regular .png file for my image if I want. I tried this and put the png file in the same folder as the menu .dat file and it worked fine. 

Then in my custom menu I added this line, right below the menu page title -

**M0
D0
JIC: Schematic Symbols
Default Electrical menu|back2wd.sld|$C=(c:wd_loadmenu "ACE_JIC_menu.dat")(c:wd_insym_go2menu 0)
Push Buttons|s2(s_pb)|$S=M3

This way I can get back to the standard menu. Again, I don't have the back2wd.sld so it looks like a blank box.

icon_menu_back2wd.png

 

If this doesn't work for you, please upload your menu files with a reply and I can take a look at them.

 

Regards,

Pat

 

 



Pat Murnen
Principal Content Developer
Product Development – AutoCAD Product Line Group

Autodesk, Inc.

0 Likes
Message 11 of 13

Anonymous
Not applicable

Thanks, that seems to do the trick. But I had some other issues.

 

I am using AutoCAD Vault, so AutoCAD Electrical is set to get support files and the library  files from the local Vault storage location.

Library location and icon files paths are set to Vault storage location an Vault storage location is on top on the support file list.

Support files.png

 

We use 3 menus: Schematic, P&ID and Panel.

At first I was getting random results, when clicking on the Icon Menu some had these menus others did not.

When using the "Icon menu wizard" an selecting the .dat manually the menus appeared, so my guess is that AutoCAD Electrical is pulling .dat files from another place. Most likely the standard storage location, even though I have specified it not to do so. The ones stored in C:\program files\autodesk\autocad 2015\acade\.

I can not delete the standard .dat due to IT restrictions, so I added the following line in the wd.env file and that seems to fix the problem:

WD_SUP_ALT,C:\Data\_Vault\ACADE Data\Parts Library,to include an alternate support path (searched before normal AutoCAD Electrical support path)

 

Some issue still remains:

1. Under schematic pressing the icon  menu first, the schematic IEC61892 appears, ok.

When selecting Insert components->Insert P&ID Components my P&ID icon menu appears with the custom menus, ok.

If I then click Icon menu under schematic again I am taken directly to the P&ID menu, how to change back to the schematic (IEC61892) ? I can change it back by running the wizard, but this the only option or am I missing somethings here?

 

2. I want Electrical to open my custom icon menus first, which we I have done by specifying these under project properties and including them in the wd.env file.

WD_MENU,C:\Data\_Vault\ACADE Data\Parts Library\MEASUREMENT_SCHEMATIC_MENU.DAT,to override default schem icon menu

WD_PMENU,C:\Data\_Vault\ACADE Data\Parts Library\MEASUREMENT_PANEL_MENU.DAT,to override default panel layout icon menu

 

Is there anyway to change the standad P&ID .dat files? Will that be WD_PIDMENU....?

 

Is the solution to both these problems to just include all schematic (IEC61892 and P&ID) in one custom icon file instead of splitting them like Electrical does?

 

 

0 Likes
Message 12 of 13

Anonymous
Not applicable

I let this sink in  for an hour and released I have answered my own question.

So what I have done now is to have 1 custom schematic and 1 custom panel.

In the custom schematic I have added 2 lines linking to the standard ACE_IEC61892_MENU.dat and ACE_PID_MENU.dat.

Now I can move between libraries like i want.

 

Schematic menu.png

 

Message 13 of 13

PatMurnen_Adsk
Alumni
Alumni

Glad you are all set up now. I think there was an issue in earlier releases with switching between the schematic and P&ID icon menus. So your solution is a good idea and should avoid that issue.

Regards,

Pat



Pat Murnen
Principal Content Developer
Product Development – AutoCAD Product Line Group

Autodesk, Inc.