Author Topic: Solved: AutoCAD vs AutoCAD LT Menu Difficulties  (Read 5651 times)

0 Members and 1 Guest are viewing this topic.

Kate M

  • Guest
Solved: AutoCAD vs AutoCAD LT Menu Difficulties
« on: September 12, 2005, 02:17:25 PM »
Okay, I'm stumped:

I have a custom menu that I'm trying to load in both LT and full. It has one pull-down and two toolbars. No matter what I do, I can't get everything to load in both versions at the same time. I have two other custom menus, pull-down only, that load just fine. But with this one, the toolbars don't like to load in LT for some reason...grr! Has anyone seen this before? I can post the menu if that'll help.
« Last Edit: September 13, 2005, 03:22:28 PM by M-dub »

M-dub

  • Guest
Re: Menu Load
« Reply #1 on: September 12, 2005, 02:27:32 PM »
Yes, it would help if you posted it.

Is it a full menu or a partial menu?

Kate M

  • Guest
Re: Menu Load
« Reply #2 on: September 12, 2005, 02:31:33 PM »
Partial...'cause it's loaded in addition to other menus (right?).

It's just a bunch of layer tools...here 'tis:

Code: [Select]
//
//      AutoCAD menu file - J:\Menus\rsa_menu.mns
//

***MENUGROUP=RSA_MENU

***POP1
ID_MNLT_layers  [Layer Tools]
ID_LAYCHG       [Change Object's Layer]^C^C_select;\_change;p;;p;la;$m=$(getvar,clayer);;
ID_LAYISO       [Isolate Layer]^C^C_ai_molc;\_-layer;off;*;n;;
ID_LAYON        [All Layers On]^C^C_-layer;on;*;;
ID_LAYOFF       [Turn Layer Off]^C^C_setenv;oldlayer;$m=$(getvar,clayer);_ai_molc;\"_-layer;_set;$M=$(getenv,oldlayer);_off;$M=$(getvar,clayer)";;
ID_LAYTHW       [Thaw All Layers]^C^C_-layer;thaw;*;;
ID_LAYFRZ       [Freeze Layer]^C^C_setenv;oldlayer;$m=$(getvar,clayer);_ai_molc;\"_-layer;_set;$m=$(getenv,oldlayer);_freeze;$m=$(getvar,clayer)";;
ID_LAYLCK       [Lock Layer]^C^C_setenv;oldlayer;$m=$(getvar,clayer);_ai_molc;\"_-layer;_set;$m=$(getenv,oldlayer);_lock;$m=$(getvar,clayer)";;
ID_LAYULK       [Unlock Layer]^C^C_setenv;oldlayer;$m=$(getvar,clayer);_ai_molc;\"_-layer;_set;$m=$(getenv,oldlayer);_unlock;$m=$(getvar,clayer)";;

***TOOLBARS
**TOOLS1
TAG1           [_Toolbar("Tools1", _Floating, _Show, 100, 380, 1)]
TAG2           [_Button("Set Linetype Scale", "lts.bmp", "lts.bmp")]^C^Cltscale;$M=$(*,$(getvar,dimscale),0.5)

**LT_Layers_TOOLBAR
ID_LTX_LAYERS   [_TOOLBAR("LT Layer Tools",_Floating,_Show, 187, 170, 1)]
ID_LAYISO       [_Button("Isolate Layer", "layiso16.BMP", "layiso24.BMP")]^C^C_ai_molc;\_-layer;off;*;n;;
ID_LAYOFF       [_Button("Turn Layer Off", "layoff16.BMP", "layoff24.BMP")]^C^C_setenv;oldlayer;$m=$(getvar,clayer);_ai_molc;\"_-layer;_set;$M=$(getenv,oldlayer);_off;$M=$(getvar,clayer)";;
ID_LAYON        [_Button("All Layers On", "layon16.BMP", "layon24.BMP")]^C^C_-layer;on;*;;
ID_LAYFRZ       [_Button("Freeze Layer", "layfrz16.BMP", "layfrz24.BMP")]^C^C_setenv;oldlayer;$m=$(getvar,clayer);_ai_molc;\"_-layer;_set;$M=$(getenv,oldlayer);_freeze;$M=$(getvar,clayer)";;
ID_LAYTHW        [_Button("Thaw All Layers", "laythw16.BMP", "laythw24.BMP")]^C^C_-layer;thaw;*;;
ID_LAYLCK       [_Button("Lock Layer", "laylck16.BMP", "laylck24.BMP")]^C^C_setenv;oldlayer;$m=$(getvar,clayer);_ai_molc;\"_-layer;_set;$m=$(getenv,oldlayer);_lock;$m=$(getvar,clayer)";;
ID_LAYULK       [_Button("Unlock Layer", "layulk16.BMP", "layulk24.BMP")]^C^C_setenv;oldlayer;$m=$(getvar,clayer);_ai_molc;\"_-layer;_set;$m=$(getenv,oldlayer);_unlock;$m=$(getvar,clayer)";;
                [--]
ID_LAYCHG       [_Button("Change Object's Layer", "laychg16.BMP", "laychg24.BMP")]^C^C_select;\_change;p;;p;la;$m=$(getvar,clayer);;

***HELPSTRINGS
TAG2           [Sets LTSCALE = 0.5 x DIMSCALE]

ID_LAYISO       [Isolate layer of selected object]
ID_LAYOFF       [Turn off layer of selected object]
ID_LAYON        [Turn all layers on]
ID_LAYFRZ       [Freeze layer of selected object]
ID_LAYTHW       [Thaw all layers]
ID_LAYLCK       [Lock layer of selected object]
ID_LAYULK       [Unlock layer of selected object]
ID_LAYCHG       [Move selected object to current layer]

//
//      End of AutoCAD menu file - J:\Menus\rsa_menu.mns
//

Kate M

  • Guest
Re: Menu Load
« Reply #3 on: September 12, 2005, 02:32:10 PM »
Just noticed the nifty code window -- pretty neat. :-)

M-dub

  • Guest
Re: Menu Load
« Reply #4 on: September 12, 2005, 02:43:59 PM »
Ok, give this a try...Not sure if it will make any difference, but...it worked on my machine.( 2k4 )

Code: [Select]
//
//      AutoCAD menu file - J:\Menus\rsa_menu.mns
//

***MENUGROUP=RSA_MENU

***POP1
**[&Layer_Tools]
[&Change Object's Layer]^C^C_select;\_change;p;;p;la;$m=$(getvar,clayer);;
[&Isolate Layer]^C^C_ai_molc;\_-layer;off;*;n;;
[&All Layers On]^C^C_-layer;on;*;;
[&Turn Layer Off]^C^C_setenv;oldlayer;$m=$(getvar,clayer);_ai_molc;\"_-layer;_set;$M=$(getenv,oldlayer);_off;$M=$(getvar,clayer)";;
[T&haw All Layers]^C^C_-layer;thaw;*;;
[&Freeze Layer]^C^C_setenv;oldlayer;$m=$(getvar,clayer);_ai_molc;\"_-layer;_set;$m=$(getenv,oldlayer);_freeze;$m=$(getvar,clayer)";;
[&Lock Layer]^C^C_setenv;oldlayer;$m=$(getvar,clayer);_ai_molc;\"_-layer;_set;$m=$(getenv,oldlayer);_lock;$m=$(getvar,clayer)";;
[&Unlock Layer]^C^C_setenv;oldlayer;$m=$(getvar,clayer);_ai_molc;\"_-layer;_set;$m=$(getenv,oldlayer);_unlock;$m=$(getvar,clayer)";;

***TOOLBARS
**TOOLS1
ID_TbTools [_Toolbar("Tools1", _Floating, _Show, 100, 380, 1)]
ID_TAG2 [_Button("Set Linetype Scale", "lts.bmp", "lts.bmp")]^C^Cltscale;$M=$(*,$(getvar,dimscale),0.5)

**LT_Layers_TOOLBAR
ID_LTX_LAYERS   [_TOOLBAR("LT Layer Tools",_Floating,_Show, 187, 170, 1)]
ID_LAYISO       [_Button("Isolate Layer", "layiso16.BMP", "layiso24.BMP")]^C^C_ai_molc;\_-layer;off;*;n;;
ID_LAYOFF       [_Button("Turn Layer Off", "layoff16.BMP", "layoff24.BMP")]^C^C_setenv;oldlayer;$m=$(getvar,clayer);_ai_molc;\"_-layer;_set;$M=$(getenv,oldlayer);_off;$M=$(getvar,clayer)";;
ID_LAYON        [_Button("All Layers On", "layon16.BMP", "layon24.BMP")]^C^C_-layer;on;*;;
ID_LAYFRZ       [_Button("Freeze Layer", "layfrz16.BMP", "layfrz24.BMP")]^C^C_setenv;oldlayer;$m=$(getvar,clayer);_ai_molc;\"_-layer;_set;$M=$(getenv,oldlayer);_freeze;$M=$(getvar,clayer)";;
ID_LAYTHW        [_Button("Thaw All Layers", "laythw16.BMP", "laythw24.BMP")]^C^C_-layer;thaw;*;;
ID_LAYLCK       [_Button("Lock Layer", "laylck16.BMP", "laylck24.BMP")]^C^C_setenv;oldlayer;$m=$(getvar,clayer);_ai_molc;\"_-layer;_set;$m=$(getenv,oldlayer);_lock;$m=$(getvar,clayer)";;
ID_LAYULK       [_Button("Unlock Layer", "layulk16.BMP", "layulk24.BMP")]^C^C_setenv;oldlayer;$m=$(getvar,clayer);_ai_molc;\"_-layer;_set;$m=$(getenv,oldlayer);_unlock;$m=$(getvar,clayer)";;
                [--]
ID_LAYCHG       [_Button("Change Object's Layer", "laychg16.BMP", "laychg24.BMP")]^C^C_select;\_change;p;;p;la;$m=$(getvar,clayer);;

***HELPSTRINGS
TAG2           [Sets LTSCALE = 0.5 x DIMSCALE]

ID_LAYISO       [Isolate layer of selected object]
ID_LAYOFF       [Turn off layer of selected object]
ID_LAYON        [Turn all layers on]
ID_LAYFRZ       [Freeze layer of selected object]
ID_LAYTHW       [Thaw all layers]
ID_LAYLCK       [Lock layer of selected object]
ID_LAYULK       [Unlock layer of selected object]
ID_LAYCHG       [Move selected object to current layer]

//
//      End of AutoCAD menu file - J:\Menus\rsa_menu.mns
//

Kate M

  • Guest
Re: Menu Load
« Reply #5 on: September 12, 2005, 02:50:04 PM »
Hmm..so you don't need ID's in the POP sections? I didn't know that.

It worked in full, but I only got the pull-down in LT (no toolbars). Same as before...

M-dub

  • Guest
Re: Menu Load
« Reply #6 on: September 12, 2005, 02:54:14 PM »
Hmmm...
I'm not familiar with LT at all, so I wouldn't know what to change.  My guess is that there's something extra in there that it doesn't know how to handle.  Conversely, it could be missing something too.

You don't see anything when you click on Tools > Customize > Toolbars...?

Kate M

  • Guest
Re: Menu Load
« Reply #7 on: September 12, 2005, 03:03:57 PM »
No, the Toolbar command shows a blank. I can't figure it out. If I get it to load fully in LT (which I can do, sometimes, I still don't know how), it won't load at all in full -- no pull-down or toolbars.

M-dub

  • Guest
Re: Menu Load
« Reply #8 on: September 12, 2005, 03:07:55 PM »
Strange indeed!

What do you see when you create a custom toolbar within LT, then check the menu file?  Is the syntax the same?

(I think we could use a hand from someone who knows LT a little better than myself.  Anyone out there? )

ELOQUINTET

  • Guest
Re: Menu Load
« Reply #9 on: September 12, 2005, 03:18:23 PM »
umm yeah what dub said lololololol i'm such a wise ass :evil:

M-dub

  • Guest
Re: Menu Load
« Reply #10 on: September 12, 2005, 03:20:32 PM »
If you're so wise, fix the problem, you @$$

:twisted:

j/k

Kate M

  • Guest
Re: Menu Load
« Reply #11 on: September 12, 2005, 03:26:19 PM »
I can't find any differnences in syntax. I did get one menu to work, by created a custom toolbar (within AutoCAD) and populating it with the buttons from the toolbar I wrote by hand (in notepad). I'm going to clean up the icon references and see what I come up with...

ELOQUINTET

  • Guest
Re: Menu Load
« Reply #12 on: September 12, 2005, 03:26:59 PM »
dub look at my post in the news section

Kate M

  • Guest
Re: Menu Load
« Reply #13 on: September 12, 2005, 03:27:59 PM »
I lied. None of them work in both versions. I'm going to start over, one item in a pulldown and one in a toolbar, and see where that goes.

M-dub

  • Guest
Re: Menu Load
« Reply #14 on: September 12, 2005, 03:34:47 PM »
What I was going to say (since this is a very small menu) is that it might be worth trying to create everything you need within acad, then cut and paste everything in Notepad to create your partial menu.  (does that make sense)

M-dub

  • Guest
Re: Menu Load
« Reply #15 on: September 12, 2005, 03:36:01 PM »
...the toolbars, that is...
I'm not aware of a method to breate pulldowns within acad.

CottageCGirl

  • Guest
Re: Menu Load
« Reply #16 on: September 12, 2005, 03:44:13 PM »
are you loading off of your C drive or a network,,,, if you are loading off your C drive, I find that I need to have custom menu's in each custom folder for all versions, for some reason the menu path gets confused if it is too far down the path-- I think this has to do with our network    ( am I making myself clear-let me know if I am not making sense.... :roll:)

M-dub

  • Guest
Re: Menu Load
« Reply #17 on: September 12, 2005, 03:44:25 PM »
Ok, I have to ask although you've probably addressed this already.

Does the menugroup name match one already existing?

Dommy2Hotty

  • Swamp Rat
  • Posts: 1127
Re: Menu Load
« Reply #18 on: September 12, 2005, 03:56:39 PM »
Your original posted code worked for me Kate...got both toolbars and the menu ~ ADT 2005

Kate M

  • Guest
Re: Menu Load
« Reply #19 on: September 12, 2005, 04:03:15 PM »
I'm wondering if this doesn't have to do with having two versions on the same computer -- or if AutoCAD full recompiles menus with toolbars differently from LT. (I have no problems with pulldown-only menus.)

Latest Sequence:
1. Create empty "stuff.mns" in a network folder
2. Populate "stuff" with buttons using TOOLBAR (LT).
3. Load "stuff" in full AutoCAD -- works.
4. Close LT, reopen. No "stuff".

This is really bizarre...

VerticalMojo

  • Guest
Re: Menu Load
« Reply #20 on: September 12, 2005, 05:12:24 PM »
1. check your support path

2. M-dub is right, Check the menugroup name to see if it matches one already existing.

Kate M

  • Guest
Re: Menu Load
« Reply #21 on: September 12, 2005, 05:18:51 PM »
1. check your support path
Nope, got it.

2. M-dub is right, Check the menugroup name to see if it matches one already existing.
Nope, I watch the command line, and it complains if you try to do that ("A menu with that MENUGROUP name already exists.")...when it "doesn't load" now, I get nothing. No command line messages, no errors, just click the button and nothing happens.

It's really just the toolbars -- pulldowns are fine. I've put this in the Autodesk groups too, in case there are more LT people over there.

M-dub

  • Guest
Re: Menu Load
« Reply #22 on: September 13, 2005, 09:14:43 AM »
...when it "doesn't load" now, I get nothing. No command line messages, no errors, just click the button and nothing happens.

It's really just the toolbars -- pulldowns are fine. I've put this in the Autodesk groups too, in case there are more LT people over there.

Ok, wait a sec here...You're saying the toolbars LOAD, but don't function?  Command line doesn't say ANYTHING when you click a button?  How many other menus do you have loaded out of curiosity?

Kate M

  • Guest
Re: Menu Load
« Reply #23 on: September 13, 2005, 10:08:38 AM »
I've done a little playing around, and here's what I got.

1. A MNS file, loaded in LT first, will not load at all in full. No errors, no messages, nothing. (Although clicking on the "Load" button really fast seems to say something about the MNC file down where the helpstrings appear.)
2. The same MNS file, copied, renamed, and loaded in full first, will load pulldown menus in LT, but acts as if it has no toolbars. The toolbars don't load; nothing shows up in the TOOLBAR command.

This leads me to believe that somehow the two programs compile menu files differently. I can't imagine why this would be. I'm going to try to post the MNS/MNC/MNR files from LT, so someone can test it and see if it's just me.

Kate M

  • Guest
Re: Menu Load
« Reply #24 on: September 13, 2005, 10:12:22 AM »
Okay, they're in the Lilly Pond (my folder), "rsa_menu_lt.mns/mnc/mnr". I didn't include the bitmaps, but you'll at least know if it loads.

M-dub

  • Guest
Re: Menu Load
« Reply #25 on: September 13, 2005, 10:15:10 AM »
It wouldn't surprise me if the two ARE different.  I agree that it would be nice if they were the same, but ...I dunno.

What does the help file in LT say about menu files?

Kate M

  • Guest
Re: Menu Load
« Reply #26 on: September 13, 2005, 10:16:40 AM »
It's the exact same page as the full version.

I don't know why it just affects toolbars, though...yeesh.

M-dub

  • Guest
Re: Menu Load
« Reply #27 on: September 13, 2005, 10:24:27 AM »
How many other menus do you have loaded?  I'm just wondering if there's a conflict of some sort

Although, with unique menu group names, I don't know how...

Kate M

  • Guest
Re: Menu Load
« Reply #28 on: September 13, 2005, 11:45:27 AM »
According to Chip Harper (over at the Autodesk forums), you can use the same MNU/MNS file for each version as long as they're in separate folders so they can create their own MNC/MNR files. Guess that's how it's always worked, both between new/old versions and LT/full.

I suppose that makes sense, sort of...At least now I know it's not my fault. :-)

Thanks for all the help!

VerticalMojo

  • Guest
Re: Menu Load
« Reply #29 on: September 13, 2005, 11:50:56 AM »
So it does work now?

M-dub

  • Guest
Re: Menu Load
« Reply #30 on: September 13, 2005, 11:59:14 AM »
So, is it working now?  Do I understand you correctly?

Kate M

  • Guest
Re: Menu Load
« Reply #31 on: September 13, 2005, 02:44:47 PM »
It only works if you copy the MNS into two separate folders, so that each version can create its own MNC/MNR files. It means you have to maintain two files, but at least you can just copy & replace one of them when you make a change. Then the MNC/MNR files will recompile and you'll be all set again.

So now I have a "Menus\AutoCAD" folder and a "Menus\AutoCAD LT" folder, with the same MNS in each, and everything's fine.

M-dub

  • Guest
Re: Menu Load
« Reply #32 on: September 13, 2005, 03:03:59 PM »
Makes sense.  Glad to hear everything's back to normal!

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Solved: AutoCAD vs AutoCAD LT Menu Difficulties
« Reply #33 on: September 14, 2005, 12:55:36 PM »
sometimes the MNC file is not correctly compressed..

make sure to delete the MNL MNR and MNC file before re-compress the MNC.

AutoCAD read the MNC file and not the MNS but need MNS to create the MNC.

I have fixed many diffrent problems doing this.  it work all times.

Keep smile...

gerstal82

  • Guest
Re: Solved: AutoCAD vs AutoCAD LT Menu Difficulties
« Reply #34 on: September 14, 2005, 01:14:15 PM »
You'd better not delete the MNL file. This is a lisp-file used for the other menu files.
This is one file that isn't created on its onw, you have to make it yourself.

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Solved: AutoCAD vs AutoCAD LT Menu Difficulties
« Reply #35 on: September 14, 2005, 05:21:34 PM »
sorry..gerstal82

I have made a mistake....you'r right. :|
Keep smile...