Can I make this work in a image menu? The macro works fine on a toolbar and a pop down menu, but I need it to run from an image menu.
[KEYTAG(DOOR,DOOR)]^C^C-INSERT;DOOR;ps;(getvar "ltscale");\(getvar "ltscale");;
Thanks,
|
Can I make this work in a image menu? The macro works fine on a toolbar and a pop down menu, but I need it to run from an image menu.
[KEYTAG(DOOR,DOOR)]^C^C-INSERT;DOOR;ps;(getvar "ltscale");\(getvar "ltscale");;
Thanks,
Last edited by sifuentes; 2006-05-17 at 05:06 PM.
HiOriginally Posted by sifuentes
Have you tried associating the above command macro with an Image Tile Menu.
If yes, what happened ?
If no, try it and see what happens.
Below is extracted from the AutoCAD Online Help File [F1]...
Have a good one, MikeOriginally Posted by Overview of Image Tile Menus
The menu is already made and works fine, it is our office block library. I am just trying to find out if we can add more functionality.
The original menu code reads like this:
[KEYTAG(DOOR,DOOR)]^C-INSERT;DOOR;;\;\
and works fine. But when I change it to:
[KEYTAG(DOOR,DOOR)]^C^C-INSERT;DOOR;ps;(getvar "ltscale");\(getvar "ltscale");;
the image menu works normally (scale factors default to 1) but doesn't take the ltscale for scale factors. And as stated, trying the macro in toolbars and pull downs work fine. I am missing something? Or lisp can't be used in image menus?
I also have another question from the original code line: why is the block name followed by two enters? First I tought it was a typo, but all block names are followed by two enters, where they only need one to continue the command. Is there some purpose on that?
It seems I can't even scale a block at all. The following works well in a pop down menu, but not in the image menu.
[NAME(PLTTL,PLAN TITLE)]^C-INSERT;PLTTL;\25.4;;\
In the pop down it scales the block 25.4 times, but on the image menu it prompts for x scale factor.
The customization guide says "Image tile menu macros can perform the same function as other menu macros" but obviously they don't, at least not in the same manner as toolbars or pull downs. Or is that incorrect and that is a limitation of image menus?
Last edited by sifuentes; 2006-05-17 at 05:58 PM.
HiOriginally Posted by sifuentes
Not that I am away of. Only one ";" is required after the Block name. Why someone put two of them ";;" there, I do not know.
When I associate...
with a test Image Tile Menu Label, it works without a problem.Code:^C^C-INSERT;TestInsert;ps;(getvar "ltscale");\(getvar "ltscale");;
Therefore is your Image Tile Menu Label correct ie
Does...
[KEYTAG(DOOR,DOOR)]
Correctly correspond with the following format ( taken directly from the AutoCAD Online Help File [F1] )...
Have a good one, MikeOriginally Posted by Overview of Image Tile Menus
Thanks Mike. The slidename and lbltext are correct, and the original menu works fine, it is the new code I am adding that doesn't work, and the problem seems to be somewhere else, which I can't figure out either. Here's the situation:
We have MENU1 which is our office's standard blocks library and is an image tile menu. It is loaded in all our Autocads, and it works fine. The changes now are because I am trying to add some functionality, so in order to keep the original MENU1, I copied it to a different folder, and renamed the copy MENU2. I add the new folder to the support search path, and leave it at the end of the list. I add the code provided before to a line in MENU2 and load it in Autocad, and keep MENU1 loaded. I try the new code added to MENU2 and it doesn't work, but it works well in toolbars and pop down menus, and Mike Perry confirms it works on an image tile menu.
What I tried next was this: I added the code to the original MENU1, reload it and voila, the new code is working. I also tried loading MENU2 and unloading MENU1, but when I do that MENU2 doesn't work at all. It doesn't show anything, which is curious because MENU2 is an exact copy of MENU1, the only difference being the new small code added.
What I need is to have both menus loaded, but one will insert blocks in imperial units drawings, and the other in metric units drawings, using the same blocks from a single library. The reason is that our original block library is drawn in imperial units. We need to use that library for projects to be in metric units. Instead of copying and redefining blocks to be metric, I want to keep a single blocks folder, and scale the blocks adding some code in the menu. This will keep me from renaming a new set of metric blocks too. I will also add some functionality to the imperial menu to insert annotation blocks using the ltscale as scale factor. The metric menu will scale drawing components by 0.0254, and annotation blocks by 0.0254*ltscale.
So my two remaining questions are:
Why does MENU1 take precedence when invoking the insertion of a block from MENU2?
Why is MENU2 rendered useless if I unload MENU1?
Thanks again,
Hi
Does the Image Menu appear without any problem in MENU2 when you invoke it ?
Is it possible to post MENU1 and MENU2 ( if possible, you could place both in a ZIP file before uploading to the forums ), so we can take a look at the contents of both of them...
Have a good one, Mike
Here they are. 1 STANDARDBLOCKS.mns = MENU1 and 1 STANDARDBLOCKS M.mns = MENU2
The only line that has been modified in 1 STANDARDBLOCKS M.mns is the one for the DOOR keytag, for which I am providing the slide and dwg. 1 STANDARDBLOCKS.mns is in its original version without the new code.
Thanks,
HiOriginally Posted by sifuentes
Ok! give the following a try, it works for me at this end...
Warning, I have only carried out limited testing. I leave it up to yourself too carry-out detailed testing.
* Open "1 STANDARDBLOCKS M.mns" in a Plain Text Editor eg Notepad.
* Find and Replace all instances of "Standardblocks" with "StandardblocksM". Make sure you do not end up with an instances of "StandardblocksMM".
* Exit and Save.
* Unload "1 STANDARDBLOCKS.mns" from AutoCAD, if need be.
* Within AutoCAD load "1 STANDARDBLOCKS M.mns".
Image menus should now function / work without any problem when using "1 STANDARDBLOCKS M.mns".
Have a good one, Mike
Thanks Mike, that solved the problem. Just run some tests and is working. Will start adding things to the menu.