Moving ToolBars

sashk

Usenet Archive
Joined
Jul 14, 2003
Messages
69
Reaction score
0
Hello All,

I have some custom toolbars that I placed in random areas. Problem: When I exit autocad and invoke the program again, the toolbars moved to a different area. Any ideas why??
 
It may be the toolbars have been set up at a specified location -

examine LSP and MNL files. Look for toolbar "show" ..... there may be x,y numbers specifying WHERE to SHOW the Toolbar.
 
You have not written the locations to the .MNS file.

 

With eth toolbars where you want them to be open the customise toolbars dialogue by right clicking on the toolbars.  Make some small change - eg swap the positions of 2 icons and close.  This SHOULD write the new positions to the .MNS file and re-compile the menu.  From there on the toolbars will remain in the positions that you want.

 
 
Well, I tried everything. When I exit autocad and come back, they still are in the wrong spot. Can I manipulate the code in the .mns so that I can put it anywhere??

thanks
 
.... don't know.
What reference (if any) does the MNL make to toolbars?
 
I have been loading the .mns file. Should I be loading the .mnl file????? What I did was create a menu file with only toolbars in it and no menu commands. Then I load the toolbars.mns file. Is this right??
 
No need to unload a mnu to get the mns written
when you load a mnu acad creates the mns and a mnc
acad actually just uses the mnc (compiled) but the mns is human readable.

if you change a toolbar graphically(in the editor) as opposed to editing the text in the mnu, the changes will only be updated in the mns file not the mnu file and you will therefore lose those changes if you reload the mnu file. one approach is to refrain from editing toolbars in the editor and do your changes manually in the mnu file, delete the mns and mnc files, then reload the mnu file, and you will always keep your changes. another approach is if you edit the toolbars in the editor, immediately open the .mns file and copy the changed lines, then open the mnu file and paste them where they go, delete the mnc and mns files and reload the mnu. that way also you will retain the changes. if your menu file calls any lisp routines, the mnl file is the usual place to put those routines because acad autoloads the mnl file when it loads the mnu file and your routines will thus be available when you call them from the menu. it's not absolutely necessary to follow this, you can load them other ways also, it's up to you, but generally the mnu and mnl are seen as complementary files that contain(mnl) and refer to(mnu) the same routines.

hth
Mark
 
Mark, thanks for the advise. What I decided to do was just go ahead and edit the .mns file so that any toolbar makes that I do will automatically be written in the .mns file. The only problem that I have with the .mns file is that its setup is a little different than the .mnu file, making it a little more of a problem. it is something that I have to do.

Now, the .mnl file. Here is what I have going on.
I have it load a file called "lsp-libe". Now, the "lsp-libe" has a huge list of lisp routines to load. Here is an example:
(if (not c:zzz) (Load "zzz")).
Now, I thought that it was loading all of these lisps into autocad at once, but when I typed in the appload function, I did not see a huge list in there. So, I am assuming that it did a partial load?

I also read about the "autoload" function. I tried (autoload "zzz") and also (autoload '(zzz)) but it returns a syntax error. Any ideas on that??

Thanks
 
sashk said:
Mark, thanks for the advise. What I decided to do was just go ahead and
edit the .mns file so that any toolbar makes that I do will automatically be written in the .mns file.

I would suggest you copy those to the mnu as well, if you want to not lose your hard work the next time someone reloads the menu
Now, the .mnl file. Here is what I have going on.
I also read about the "autoload" function. I tried (autoload "zzz") and
also

an example from my acaddoc.lsp
(autoload "C:/0/0CODE/LISP/MASTER/matchline" '("matchline")) that way as soon as you type matchline at the command line, if it's not defined, the file is loaded, if you don't use it the file doesn't need to load.

you're welcome
hth
Mark
 
Mr. Propst is correct. You should make your changes in the mnu file and then when you re-compile it, the mns, mnc files will be changed accordingly. If you have your toolbar in the **TOOLBARS section it should look something like the sample below:

**TB_YOURTOOLBARNAME
ID_NAMEOFTOOLBAR_0 [_Toolbar("NAMEOFTOOLBAR",_Floating,_Show,400,50,0)] ID_TRIM_0 [_Button("TRIM", "XXXX.bmp", "XXXX.bmp")]^c^ctrim

The second line will allow you to "dock" your toolbar anyplace you wish and it will remain there until you "dock" it somewhere else.
 
Walt,

I did everything you said, and still no luck. When I exit autocad, it reverts back to its old place. I did notice that "floating" was not there. Instead, it was "top". I changed it to floating, recompiled, loaded, etc, but still the same problem
 
did you remember to delete the mnc and mnr files before reloading? if they exist acad will use them rather than reload your new mnu file.

sashk said:
Walt,
I did everything you said, and still no luck. When I exit autocad, it
reverts back to its old place. I did notice that "floating" was not there. Instead, it was "top". I changed it to floating, recompiled, loaded, etc, but still the same problem
 
Also see sashk's other post above- Cancel in Lisp--- dealing with his MNL file.

To elaborate a bit more on MNU/MNS/MNC files:

MNU -> can contain comments behind leading //'s - otherwise, readable and concise Menu text MNS -> strips comments from MNU - if you NEED to remember something (commented), edit your MNU file, keep it current, and allow ACAD to create the MNS

MNC -> used internally by ACAD - created during Menu compilation (menuload)
command
 
Wow, this has become an issue. A couple of things that I have noticed. What I am going to do is delete my .mnc, .mns, and .mnr file and try again. Hopefully I will have some luck there.

Now, I used to have the toolbars as its own .mns structure because of the issue with reloading menus and loosing things. Now it is a part of the main menu that our office uses. Here is the weird thing. I exported a profile, open the profie to read it and discovered references to the old toolbar menu. Weird! Nowhere have I the old menu loaded, so why is it exporting old menu info?

Here is the line for my toolbar. Can someone explain what all this means.... ID_DETAIL_0 [_Toolbar("DETAIL", _Floating, _Show, 0, 2, 1)]
 

Latest threads

Back
Top