Author Topic: How to create a toolbar from scratch (not trough CUI)  (Read 5319 times)

0 Members and 1 Guest are viewing this topic.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: How to create a toolbar from scratch (not trough CUI)
« Reply #15 on: August 31, 2012, 05:16:47 AM »
The screen menu is something very old. It came from the DOS days in the 80's. Basically a column along the right-side of the screen with text in it. Each line of that column was a menu item. So you had the command-line and the screen menu, and that was it - unless you also used a tablet.

The nice thing about screen menus was that they'd update in context. E.g. while the line command is active, the relevant screen menu would be displayed for options useful in the line command.

Since around R10 (though I cannot remember exactly which version) the pull-down menus were added to the top of the screen. Then later toolbars, palettes, and finally the ribbon. The screen menu has previously been deprecated as a Legacy item (quite a while back), and recently it's been removed from the CUI interface entirely. It's still inside the CUI(x) file, but just never shown for editing.

Other stuff in the Legacy deprecated branch is Tablet areas, Tablet buttons and Image tiles. So taking the example of what's happened to screen menus, it's possible that these might also "disappear" in the future.

My best advise is to start moving your customizations into some of the newer UI elements. E.g. Ribbon panels - they provide the same functionality as you got from the screen menu (e.g. a ribbon specific to the current command opens when that command is active). You could use some of the others as well, e.g. tool palettes / toolbars / pop-up menus / pull-down menus / etc.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: How to create a toolbar from scratch (not trough CUI)
« Reply #16 on: August 31, 2012, 05:25:04 AM »
And just to be clear. The code you've shown is part of the old MNU files. These have also been replaced by CUI(x) files. You can still load them, but what happens is acad converts them into CUI(x) files then loads those.

You can edit CUI(x) files as you could MNU's (see my previous link about XML files), but ADesk warns that such might break stuff like automatic updates. And of course since they're not documented, it's very easy to break something because you don't know exactly what each thing does.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: How to create a toolbar from scratch (not trough CUI)
« Reply #17 on: August 31, 2012, 05:28:23 AM »
If you mean you still cannot see the screen menu, then use autolisp to turn it on. Copy the following into your command line
Code: [Select]
(setvar "screenmenu" 1)You should then get a panel on the right side of the ACad screen looking like this.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: How to create a toolbar from scratch (not trough CUI)
« Reply #18 on: August 31, 2012, 06:21:58 AM »
Ohhhha :-) little history Iīd like the 80īs but no only music... :kewl:
I think sometimes itīs great to have a menu with important internetlinks from different discussions and my firefox favorites explode quit similar. So itīs maby an idea to do this with screen menue. I set var sreenmenu on (1) but get only emty screen menu even I loaded same MNU-file like example views.

I have done it before I use CUI with MNS-files, but there is not opportunities to build in images or not?

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: How to create a toolbar from scratch (not trough CUI)
« Reply #19 on: August 31, 2012, 06:44:27 AM »
I set var sreenmenu on (1) but get only emty screen menu even I loaded same MNU-file like example views.
Strange, then your CUI file may have been edited and its ScreenMenu portion removed. Which version / vertical of ACad are you using?

I have done it before I use CUI with MNS-files, but there is not opportunities to build in images or not?
Nope, screen menus are ONLY text. If you want images as well, then use some of the other stuff - perhaps a tool palette would work better for your scenario.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: How to create a toolbar from scratch (not trough CUI)
« Reply #20 on: August 31, 2012, 07:14:44 AM »
Thanks!

I test it in both civil 2011 and 2012 same happening...

good idea with Toolpalettes I havenīt thougt about it.