Jump to content

Recommended Posts

Posted

In college, I created a menu that had pictures of blocks, and when you click on the block you can insert it. I have totally forgot how this is done!

 

I am trying to make a menu, containing blocks I have created (electrical symbols).

 

I'd appreciate it if anyone can help me out. I've read through tutorials, but can't seem to find the info anywhere.

 

I'm not sure-

 

How to code the menu.

How to get the blocks in with the pics (shape files ring a bell?) :?

 

Thanks in advance :)

Posted

I just remember - its not shape files, I meant slides. I remember slides where used, thats about all I remember LOL

Posted

Here is a small sample of what your looking for.

 

from the MNU file

 

// Begin AutoCAD Pull-down Menus

//

***POP13

**MyMenu

ID_MnMy_Menu [&My Menu]

ID_TBlock [&Title Blocks]$I=MyMenu.image_Titles $I=*

 

//

// Begin AutoCAD Image Menus

//

***image

**image_Titles

[Title blocks]

[Titles(A0 Title Block)]^C^C^C^C^C^C(command "setvar" "attdia" "1") (command "setvar" "attREQ" "1") (command "-insert" "C:\Program Files\Acadm 6\Template\A0.dwg" "0,0,0" "1" "1" "0")(command "zoom" "extents")

 

I like to set some variable in the process so that on insertion the edit attributes dialog will appear.

 

Hope this helps.

  • 3 years later...
Posted

This is great but how do you make a pull down menu in AutoCAD Ver10.

 

I understand how to make the pull down tree - Header, sub headers and them commands. I don't get how to make the insert block work in the command part. I load the menu and I see everything there like I want it but I pick the command.tThen it does not work. I am over looking something. Can someone help me?

 

Thank you

Posted

You might want to try this, I think it is what you want to do.

 

1. Have the blocks ready, so store them in a support searched path, like the map support. Lets call the map "tmcgover".

 

2. Open a new drawing and insert the first block, type "mslide" and save the slide in the folder "tmcgover". Do this for all the blocks. This can be done faster but save that for later. In this example, make 9 blocks and 9 slides.

 

3. Create a file (with notepad) called "mymenu.mnu" in the folder "tmcgover" (rightclick --> new textdocument -->rename to mymeny.mnu"). Put this code inside:

 

 

***menugroup=MYMENU

***POP1

[TMCGOVER]

[->Here the first items]
[items A...]^C^C$I=MYMENU.itemsa $I=*
[items B...]^C^C$I=MYMENU.itemsb $I=*
[->Here the second items]
[<-Items C...]^C^C$I=MYMENU.itemsd $I=*

***image

**itemsa

[select block]
[blockname1,Description 1]^C^C-insert;blockname1;s;$m=$(getvar,userr1);\\
[blockname2,Description 2]^C^C-insert;blockname2;s;$m=$(getvar,userr1);\\
[blockname3,Description 3]^C^C-insert;blockname3;s;$m=$(getvar,userr1);\\

**itemsb

[select block]
[blockname4,Description 4]^C^C-insert;blockname4;s;$m=$(getvar,userr1);\\
[blockname5,Description 5]^C^C-insert;blockname5;s;$m=$(getvar,userr1);\\
[blockname6,Description 6]^C^C-insert;blockname6;s;$m=$(getvar,userr1);\\

**itemsc

[select block]
[blockname7,Description 7]^C^C-insert;blockname7;s;$m=$(getvar,userr1);\\
[blockname8,Description 8]^C^C-insert;blockname8;s;$m=$(getvar,userr1);\\
[blockname9,Description 9]^C^C-insert;blockname9;s;$m=$(getvar,userr1);\\

***accelerators
***helpstrings
***TOOLBARS

 

4. Load the menu (type "menuload" and browse for the file "mymenu.mnu" and load it).

 

I did not test the code above but I believe it is correct.

 

Note this:

 

 
[blockname9,Description 9]^C^C-insert;blockname9;s;$m=$(getvar,userr1);\\

 

[blockname9,Description 9]^C^C

 

Red: the name of the slide

Green: the description you want to see in the left collumn

Cyan: beginning of the macro (2*cancel)

 

-insert;blockname9;s;$m=$(getvar,userr1);\\

Red: actual block name (*.dwg)

The rest is macro or command.

 

Sorry for no testing so go easy on me... Problems? Ask.

Posted

Is there any reason specifically why you would want to make a pulldown menu instead of creating a toolpalette (easy!).

The end result is the same isn't it? > selecting and inserting blocks from a visual representation.

Posted

I have to agree with the above. Tool Palettes are the way to go here. No programming required. They can also be shared easier via export/import.

Posted

Thank you for the help. I am going to try it.

 

I did make the tool palette and it was great. And maybe it will work. My boss wants to but the menu or the tool palettes on the server so everyone will have the same menu or tool palettes. The block library is on the server now. We would like all of the desk tops to be the same menus.

 

So is there away to do this with tool palettes. I know there is with pull down menus? If so I will be happy.

Posted

ReMark

 

You said "They can also be shared easier via export/import." But when you export/import they don't just update. With the pull down menus if you make a change to them it will change on all desktops. Because you make the change to the one that is on the server and when the desktop reloads you have the updated menus and blocks.

  • 2 weeks later...
Posted
Is there any reason specifically why you would want to make a pulldown menu instead of creating a toolpalette (easy!).

The end result is the same isn't it? > selecting and inserting blocks from a visual representation.

 

Yes you are so right!

(I just have experienced toolpalettes and the functions: GREAT :shock: )

  • 1 year later...
Posted

test.JPGMarcoW can you help!here can create pulldown menu with sub-menu

like my picture workspaces and palettes menu having some sub-menu.

 

***POP1

 

[TMCGOVER]

 

[->Here the first items]

[items A...]^C^C$I=MYMENU.itemsa $I=*

[items B...]^C^C$I=MYMENU.itemsb $I=*

[->Here the second items]

[

Posted

Hi JohnPieter,

 

Shure I can help, but please read this post and tell me where you "stop understanding".

If you tell me where to start then I'll help you getting it done.

 

But it's saturday, I am having some pizza and later I'll be drunk hehe. So you gotta have to wait untill monday.

 

See yah.

Posted

test1.JPG

Hi JohnPieter,

 

Shure I can help, but please read this post and tell me where you "stop understanding".

If you tell me where to start then I'll help you getting it done.

 

But it's saturday, I am having some pizza and later I'll be drunk hehe. So you gotta have to wait untill monday.

 

See yah.

 

Sure..enjoy MarcoW..

 

just create the pull down menu with submenu.as per yours its coming one pull donu option.here can you create the multiple menu?please see my pic.as per yours "Here the first items"menu having some submenu.now i want create next submenu "Here the first items-2".like that workspaces and palettes menu having some submenu line by line.

Posted

Tool palettes are even easier to create with newer versions of cad, since you can create palettes from entire folders of blocks within Design Center.

Posted

JohnPieter,

 

Tell me what you want the menu to be called; this is what will appear right next to the "Express Tools Menu".

In your picture the menu is called "Tools". Next tell me, if you want more menu's, what names to use.

And then I need to know what you want as submenu's. In your picture "Workspace's" and "Palettes" are submenu's.

 

Once we know what the menu's and submenu's should look like we can add the actions / functions in there.

Hit me, I am ready for it!

Posted

Just consider here that workspaces is one main menu.That menu having some sub menu options..Same Pallettes is 2nd main menu.PLease see below

 

Testing1(MainMenu)(As per that Picture WorkSpace)

-->SubMenuOption-1

-->SubMenuOption-2

-->SubMenuOption-3

Testing2(MainMenu)(As per that Picture Palettes)

-->SubMenuOption-4

-->SubMenuOPtion-5

-->SubMenuOption-6

Posted

JohnPieter,

 

Please use the command "menuload" and browse to the attached file.

Load it and see if the layout is what you mean.

 

Note: in many occasions the toolpalettes are more convenient, much more modern etc.

But sometimes you just want to go the old fashioned way. We can go both also.

 

I don't either of them :P.

 

Tell me if you need more help, but I am too busy so maybe it might take a bit of time.

 

Regards,

MarcoW

 

update: I couldn't post an attachement so here is the code, save it somewhere in a file called "mymenu.mnu" and load it with menuload.

 

 


***menugroup=MYMENU

***POP1

[Testing1]


[->SubMenuOption-1]
[items A...]^C^C(alert "SubMenuOption-1 Items A")
[<-Items B...]^C^C(alert "SubMenuOption-1 Items B")
[->SubMenuOption-2]
[items A...]^C^C(alert "SubMenuOption-2 Items A")
[<-Items B...]^C^C(alert "SubMenuOption-2 Items B")
[->SubMenuOption-3]
[items A...]^C^C(alert "SubMenuOption-3 Items A")
[<-Items B...]^C^C(alert "SubMenuOption-3 Items B")
 
***image

***accelerators
 
***helpstrings
 
***TOOLBARS



***POP2

[Testing2]
 
[->SubMenuOption-4]
[items A...]^C^C(alert "SubMenuOption-4 Items A")
[<-Items B...]^C^C(alert "SubMenuOption-4 Items B")
[->SubMenuOption-5]
[items A...]^C^C(alert "SubMenuOption-5 Items A")
[<-Items B...]^C^C(alert "SubMenuOption-5 Items B")
[->SubMenuOption-6]
[items A...]^C^C(alert "SubMenuOption-6 Items A")
[<-Items B...]^C^C(alert "SubMenuOption-6 Items B")

***image

***accelerators
 
***helpstrings

***TOOLBARS

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...