Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

custom menu

Status
Not open for further replies.

Sinus007

Electrical
Feb 17, 2003
4
Hi,
I'm new to Autocad. I'm trying to make custom menu to insert blocks that i made. I know it can be done with xxxx.mnu file. how to assign a certain block to a menu item? say, I pulled menu xxx, selected item ABC, clicked on it to insert block ABC. Thanks in advance.
AK
 
Replies continue below

Recommended for you

The line of code below is an example from a menu that I created a while back, it is designed to:

1. Remember the current layer (setq player (getvar "clayer"));-

2. Change the layer to the one you specify layer;m;E-LITE-CLNG-N;c;3;;;

3. Insert the object insert;C:/briefcase/cadd_standards/facilities/Electrical/lighting/e_fluor2x4.dwg;\1;;

4. Return to the saved layer \(setvar "clayer" player);


[2 X 4 Flush Ceiling Mounted Fluorescent Light Fixture]^C^C(setq player (getvar "clayer"));-layer;m;E-LITE-CLNG-N;c;3;;;-insert;C:/briefcase/cadd_standards/facilities/Electrical/lighting/e_fluor2x4.dwg;\1;;\(setvar "clayer" player);


Hope this helps some.
 
Hi dpenk,
thanks again for your example - it did help. Just a couple things: item 1 (remember current layer) and item 4 (return to it) don't work. Also, in item 3 ...\1;;... part suppose to set x and y scale to 1, right? For some reason I have to enter it manually. here's the line of code I'm using

[Prox]^c^c(setq player (getvar "clayer"));-layer;s;device;;-insert prx-no; \1;; \(setvar "clayer" player);

What did I do wrong? Thanks a lot,
AK
 
Only had a quick moment to look at your coding, however, I noticed that you had a few spaces in it where there shouldn't be.

Try this:

[Prox]^c^c(setq player (getvar "clayer"));-layer;s;device;;-insert prx-no.dwg;\1;;\(setvar "clayer" player);

 
Hi,
thanks again. I think I found the solution - just a minor correction to your last suggestion

[Prox]^c^c(setq player (getvar "clayer"));-layer;s;device;;-insert prx-no.dwg;\1;; \(setvar "clayer" player);

Appreciate the help,
AK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor