Author Topic: Seperating a mns menu file  (Read 2930 times)

0 Members and 1 Guest are viewing this topic.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Seperating a mns menu file
« on: October 30, 2004, 05:38:45 PM »
In my acad.mns I have 12 tool bars loaded up with buttons.
I have just created a new directory with a new CAB1.mns file.
In that I have created a pull down menu for all my buttons
as an alter net access method. Just messing around with that.
My question is how do I move my custom tool bars from acad.mns
to CAB1.mns? Looks like a Cut&Paste would do it except all of the
HelpStrings are mixed in with ACAD menus. Would I have to
identify & cut&paste each one?
The purpose is too consolidate & separate My custom menus & buttons
so that I can move them from my ACAD2k to my new ACAD2k4 system.

And can you export a ACAD2k profile and copy to ACAD2k4 for importing?
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

MikePerry

  • Guest
Seperating a mns menu file
« Reply #1 on: October 30, 2004, 06:26:02 PM »
Hi

Have you looked at using the Menu & Toolbar Porter from Autodesk (free download) -

Menu Toolbar Porter

Sharing AutoCAD Profiles (ARG) between different versions is best avoided due mainly too the Registry Entries that are present within the ARG file.

Have a good one, Mike

ML

  • Guest
Seperating a mns menu file
« Reply #2 on: October 30, 2004, 09:33:25 PM »
Actually, you are on the right track but it is a copy and paste.
Do you have the new menu created already?

Have you considered doing a Saveas with acad.mns file to CAB1.mns, then stripping it down from there? That may be the better approach

Mark

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Seperating a mns menu file
« Reply #3 on: October 30, 2004, 09:42:24 PM »
Mike,
Looked at the link but it says to 2005 and I don't want to combine it with the new acad.mns.

Mark,
I have started the new menu but cut & paste is doable unless I write a lisp
to extraxt out the help strings. Naa
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

ML

  • Guest
Seperating a mns menu file
« Reply #4 on: October 30, 2004, 09:46:59 PM »
I would suggest the saveas method

MikePerry

  • Guest
Seperating a mns menu file
« Reply #5 on: October 31, 2004, 08:15:51 AM »
Quote from: CAB
Looked at the link but it says to 2005 and I don't want to combine it with the new acad.mns.

Hi

I suggest you download anyone of them - AutoCAD 2005 or 2002 or 2000i / 2000 then take a first-hand look at what the utility actually does; you don't have to combine it with a new Acad.mns file; the contents can be written to any MNU or MNS file that you choose.

Have a good one, Mike

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Seperating a mns menu file
« Reply #6 on: October 31, 2004, 11:00:21 AM »
Mike,
Much Thanks, that did the trick. Although the install doesn't tell you where or
how to start the software here is an excerpt from the help file.

Quote
On the Start menu (Windows), click All Programs (or Programs)  Autodesk
Migration Tools 2005  Menu and Toolbar Porter. You can now use the Menu and
Toolbar Porter to copy custom settings from a previous version of AutoCAD or an
AutoCAD-based product to the new version, or to change the contents of an
existing MNU or MNS file.

To open a source file
On the File menu, click Open Source File.  The Open dialog box is displayed with
the default MNU file location. If you want to view MNS files, in the Files of
Type menu, click <product name> MNS Files. To view files in another location,
navigate to that location.

In the Open dialog box, select an MNU or MNS file, and then click Open. The
source menu file is loaded into the Source File location of the Menu and Toolbar
Porter.

Note  The source file is opened as read-only. It is not altered by this tool.

 On the File menu, click Open Source File.  The Open dialog box is displayed
 with the default MNU file location. If you want to view MNS files, in the Files
 of Type menu, click <product name> MNS Files. To view files in another
 location, navigate to that location.

In the Open dialog box, select an MNU or MNS file, and then click Open. The
source MNU or MNS file is loaded into the Source File location of the Menu and
Toolbar Porter.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Dommy2Hotty

  • Swamp Rat
  • Posts: 1127
Seperating a mns menu file
« Reply #7 on: November 01, 2004, 10:46:26 AM »
This is how I would do it...

Create a new .mnu, say, CABToolBar.MNU.  Put only the following lines:
Code: [Select]
Menugroup=CABToolbar
***TOOLBARS


Then, in AutoCAD, load that .MNU file.  Then add new toolbars in the CABToolbar menugroup, and drag all existing buttons to new  toolbars while holding CTRL (to make copies, not move them).  Once finished, you'll have duplicate toolbars in your new CABToolbar.MNS.  Then copy and paste those back to the CABToolbar.MNU, then you own them!

EDIT: You'll need to make minor changes to the .MNU, possibly bitmaps and controls, but that's about it.

ALL of my toolbars are in my own seperate .MNU file, that way, when I reload the ACAD.MNU, I won't lose anyt customization.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Seperating a mns menu file
« Reply #8 on: November 01, 2004, 11:32:57 AM »
Thanks Dommy
How do you handle the BMP files?
I put my new tool bar in it's own directory. I opened ACAD2004 & loaded
the tool bar but the icons were not there. I suppose the support path
needed to be added to find them in acad2000 directory but when I quit
and reload ACAD2000 it can not use the new mns file. I can't figure
why but 2K4 must be doing something to it. I made a copy for each now
CAB-2K.mns and CAB-2K4.mns. This works except for the icons.
I am thinking of moving all the bmp files related to my menus to my
menu folder. The problem I see is identifying the correct icons because
ACAD creates a copy with a coded name & uses that one. Very confusing
at this point.

The MTPorter works very well for splitting the menus. I copied my menus
to the new menu file. Oh by the way you ides for creating a new blank menu
is good as the MTPorter does not allow for creating a new menu, only
working with existing ones. As I was saying I made a copy and for safety sake
I have the originals still in the ACAD file but turned off.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Dommy2Hotty

  • Swamp Rat
  • Posts: 1127
Seperating a mns menu file
« Reply #9 on: November 01, 2004, 11:40:46 AM »
Quote from: CAB
Thanks Dommy
How do you handle the BMP files?


Since AutoCAD wants you to use it's newly created bitmaps, change the code to make sure it's using the bitmap you want it to, and make sure both have access to that Bitmap folder.  Door-16-L is my bitmap in the following.  As far as ACAD bitmaps, it should find those fine.

Code: [Select]
[_Button("1668 Left", "Door-16-L", "ICON.bmp")]^C^C-insert;rd30;end;\;;

MikePerry

  • Guest
Seperating a mns menu file
« Reply #10 on: November 01, 2004, 12:06:08 PM »
Quote from: CAB
Thanks Dommy
How do you handle the BMP files?
I put my new tool bar in it's own directory. I opened ACAD2004 & loaded
the tool bar but the icons were not there. I suppose the support path
needed to be added to find them in acad2000 directory but when I quit
and reload ACAD2000 it can not use the new mns file. I can't figure
why but 2K4 must be doing something to it. I made a copy for each now
CAB-2K.mns and CAB-2K4.mns. This works except for the icons.
I am thinking of moving all the bmp files related to my menus to my
menu folder. The problem I see is identifying the correct icons because
ACAD creates a copy with a coded name & uses that one. Very confusing
at this point.

Hi

Below snippet originally comes from an old CADManagers Guild post from Richard Binning (comes now via an AUGI Forum thread - AutoCAD 2004 menus will corrupt 2000i menu file) -

<snip>
Having them both on the same machine poses no problem unless you are pointing both version to the same custom menu.
Remember that although you may have them in separate folders, if autocad finds the menu first from the wrong location , then it might load that.

Make sure you don't hve this custom menu in the search path of both versions.

If you really want to use the same menu for both versions, then you can recompile the menu on the fly!

Try this code:

1.) save the following code to a file named acaddoc.lsp so that it loads prior to the menu being loaded.

2.) add the folder containing your custom menu and this acaddoc.lsp to your support file search path and push it up to the top of the pile.

3.) modify the code below replacing the word "Personal" with the name of your custom menu. (Note: personal is both the file name and the menugroup name.

;code below

Code: [Select]
(vl-load-com)
(if (findfile "Personal.mnr")
  (vl-file-delete (findfile "personal.mnr"))
)
(if (findfile "Personal.mnt")
  (vl-file-delete (findfile "personal.mnt"))
)
(if (findfile "Personal.mnc")
  (vl-file-delete (findfile "personal.mnc"))
)
;set the flag
(setq flag1 T)
;check if the menu is already loaded
(setq loaded (menugroup "PERSONAL"))
;if it is not loaded
(if (= loaded nil)
;do the following
  (progn
;find the menu file
    (setq temp (findfile "PERSONAL.MNS"))
;if you find the menu
    (if temp
;do the following
      (progn
;switch off dialogues
(setvar "FILEDIA" 0)
;load the menu
(command "menuload" "PERSONAL")
;switch on dialogues
(setvar "FILEDIA" 1)
;install the pulldown
(menucmd "P21=+PERSONAL.POP1")
;inform the user
(prompt "\nLoading Users Personal Menu....\n")
      ) ;progn
;menu not found, so do the following
      (progn
;inform the user
(alert "Cannot Locate THC Menu. \nRe-Run Install.")
;clear the flag
(setq flag1 nil)
      ) ;progn
    ) ;if
  ) ;progn
  (progn
;Menu previously loaded so lets unload it now
;unload the menu
    (command "menuunload" "PERSONAL")
;find the menu file
    (setq temp (findfile "PERSONAL.MNS"))
;if you find the menu
    (if temp
;do the following
      (progn
;switch off dialogues
(setvar "FILEDIA" 0)
;load the menu
(command "menuload" "PERSONAL")
;switch on dialogues
(setvar "FILEDIA" 1)
;install the pulldown
(menucmd "P21=+PERSONAL.POP1")
;inform the user
(prompt "\nLoading Users Personal
Menu....\n")
      ) ;progn
;menu not found, so do the following
      (progn
;inform the user
(alert
 "Cannot Locate Users Personal Menu.
\nRe-Run Install."
)
;clear the flag
(setq flag1 nil)
      ) ;progn
    ) ;if found
  ) ;progn
) ;if loaded

 Note: Bob Bell is reporting some crashing problems with just recompiling the menu... so I added the menu load/unload sequence. I haven't had any problems since.

Running ADT33 and ADT2004 with a common custom menu.

Thanks,

Richard Binning

CADD Coordinator
</snip>

+

The following should also help explain a little -

Sharing ToolPac 7.0/8.0 on AutoCAD 2000 & 2004

Have a good one, Mike

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Seperating a mns menu file
« Reply #11 on: November 01, 2004, 12:48:00 PM »
Thanks Mike
That answered some questions I had.

Now to sort out the icon issue. :)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.