• Home
  • Training Books
  • Subscribe to Our Email Newsletter
  • About
    • Contributors
    • Feedback
    • Contact
    • Privacy policy
    • Cookie Policy
  • Bahasa Indonesia

CADnotes

CAD Tutorials and Best Practices for professionals and students

  • Featured
  • AutoCAD
    • AutoLISP
  • Revit
    • Revit Architecture Basic
    • Revit MEP Basic Tutorial
  • Inventor
  • MicroStation
    • MicroStation Basic Tutorial
You are here: Home / AutoCAD / Exploring AutoCAD CUI: Working with toolbar and menu (part 4)

Exploring AutoCAD CUI: Working with toolbar and menu (part 4)

March 12, 2012 by Edwin Prakoso 2 Comments

In this Article...

  • Working with toolbar
    • Creating new toolbar
    • Placing commands to a toolbar
    • Loading toolbar
  • Working with menu
    • Arranging menu in workspace
    • Contextual menu

In the last tutorial, we learned how to place commands to ribbon. But we know that ribbon is not everyone’s favorite. What if you want to add the commands to toolbar? What if you want to add commands to menu? Let’s see how we can do it here.

Working with toolbar

Working with toolbar should be easier. It has fewer properties than ribbon.

First, let’s open our CUI dialog box. Remember to activate customization file to yours (mine is cad-notes, yours might be different).

Creating new toolbar

Now we work on our own customization file. Try to click the + sign on the left of toolbars category. You should see there is no item below it yet. Our customization file is empty, remember?

Right click above toolbar, and choose new toolbar from contextual menu.

new toolbar

Give your toolbar name. I named mine ‘my viewport tools’. Not very catchy name, but at least I know what tools are in it.

Placing commands to a toolbar

To place commands is easy. Switch to ‘all customization files’ and expand ‘partial customization file’. Expand your cui and expand toolbar.

Drag your commands to your custom toolbar. Very similar with ribbon, right?

drag commands below toolbar

After you finish placing commands, just click OK. You don’t have to add toolbar to workspace, even if you were working in ribbon interface. You should immediately see the toolbar.

Loading toolbar

Just in case you don’t see the toolbar, you can load it manually.

If you use ribbon interface, go to view tab, windows panel, toolbars> YOUR CUI> YOUR TOOLBAR.

load toolbar from ribbon

If you use classic interface, you can access it from menu tools> toolbars> YOUR CUI> YOUR TOOLBAR.

load toolbar from menu

As I said before, it’s very easy. Especially if you compare it to placing commands in AutoCAD ribbon!

Working with menu

Working with menu is also the same. You create a new menu below menu category in CUI file and drag your commands there.

There are things to consider, because menu is not as flat as toolbar. You can create sub menu to group same commands with different options, and separator for similar commands.

See the menu structure below. Viewport layers is a sub-menu. It contains several commands.

To easily differentiate creating viewport and modifying viewport, we can add separator. This is very logical, especially if you are already familiar with programming or customization.

menu structure

Now, how can we create the menu above in CUI?

  1. Similar to toolbar, create new menu. Right click above menus category and choose new menu from contextual menu.
  2. Drag your commands below your menu.
  3. Add new sub-menu if necessary and drag your group of commands there.
  4. Add separator if necessary. You can arrange the sequence by dragging them in CUI tree.

menu structure in cui

Arranging menu in workspace

Your new menu by default should appears as the last item. If you want it to appear elsewhere, you have to move the sequence using CUI.

Open your CUI, choose to show ‘all customization files’. Expand workspaces and select which workspace you want to arrange.

After you select the workspace, from the right pane expand menus. Drag your menu to arrange the sequence.

arranging menu

Contextual menu

Do you like to choose commands from contextual menu? You can access it by right click your mouse. We call it contextual menu because it will show only relevant commands with your selection set.

Below is contextual menu for associative array.

array contextual menu

If you don’t have anything in selection set, then common tools you can get are navigation tools.

We covered how to create contextual menu in the past, so if you are interested on how to create it, you can read creating contextual menu tutorial here.

About Edwin Prakoso

I work as a Sr. Consultant in PT Cipta Satria Informatika. I've been using AutoCAD since R14 and Revit since Revit Building 9. I occasionally write for AUGIWorld magazine and I am also active in Autodesk discussion forum. I'm a member of Autodesk Expert Elite, an appreciation for individuals who give contributions to the Autodesk community.
Connect with me on twitter or LinkedIn.

Filed Under: AutoCAD Tagged With: cui tutorial

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

2 Comments
Inline Feedbacks
View all comments
Michael Allen Kinney
Michael Allen Kinney
12 years ago

This is good for creating a custom toolbar utilizing the existing commands. What about creating custom toolbars with custom commands? For example, we have a line we need to place on a specific layer (or block for that matter). How do we get the button to place that line at a certain line weight on a certain layer? I used to be able to do this but it has been so long (over 8 years) since I have had to. Please let me know if you have any suggestions on this.
Thanks,

Mike

0
Reply
Edwin Prakoso
Edwin Prakoso
Reply to  Michael Allen Kinney
12 years ago

Michael,
You can use macro or LISP to do that. If your layer already define the line weight, you only need to change layer before starting line command.
Read this if you want to use LISP: https://www.cad-notes.com/2011/05/creating-layer-and-s…
Or this if you want to use macro: https://www.cad-notes.com/2012/02/exploring-autocad-cu…

0
Reply
wpdiscuz   wpDiscuz

Featured

Creating Flat Pattern Using Inventor Derive Tool

Do you want to create a sheet metal flat pattern from part with roll and dishing process? Try our workaround here!

Recent Articles

  • Autodesk Construction Cloud Activity Log
  • Exporting AutoCAD Plant 3D Model to Navisworks
  • Autodesk Data Connector for Power BI is Now Available

Advertisement

New on CADnotes

  • Autodesk Construction Cloud Activity Log
  • Exporting AutoCAD Plant 3D Model to Navisworks
  • Autodesk Data Connector for Power BI is Now Available
  • Autodesk Forma Design Contest
  • Revit 2025: Toposolid Enhancements

Meet the Authors

avatar for
avatar for
avatar for
avatar for
avatar for
avatar for

Get Connected

CADnotes on FacebookCADnotes on InstagramCADnotes on TwitterCADnotes on YouTube

© 2009 – 2025 CADnotes · Feedback · Privacy Policy · Become an affiliate

wpDiscuz