×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

custom menu

custom menu

custom menu

(OP)
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

RE: custom menu

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.

RE: custom menu

(OP)
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

RE: custom menu

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);

RE: custom menu

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources