Results 1 to 6 of 6

Thread: Is there an easy way to have a Toolbar button call up another Toolbar?

  1. #1
    100 Club jonathanschade's Avatar
    Join Date
    2015-11
    Posts
    130
    Login to Give a bone
    0

    Default Is there an easy way to have a Toolbar button call up another Toolbar?

    Is there an easy way to have a Tool Bar button call up another Tool Bar? I tried using a flyout button, but the menu does not stay on the screen long enough to be very useful. I am trying to write a CUI menu that can have multiple levels that are easy to reach. I want to take up as little real estate as possible. So I am trying to have a button for Architecture that calls up another menu bar that has architectural options, and another one with Interiors options, and so forth. Am I barking up the wrong tree? Am I asking AutoCAD to do something that it is not supposed to do? By the way I am using 2006.
    Thanks

  2. #2
    AUGI Addict
    Join Date
    2005-07
    Posts
    2,356
    Login to Give a bone
    0

    Default Re: Is there an easy way to have a Toolbar button call up another Toolbar?

    This may help, also have you thought about using tool palettes to do this.

  3. #3
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Is there an easy way to have a Toolbar button call up another Toolbar?

    Use something similar to this for a command macro.

    ^C^C._-Toolbar;MyMenuGroup.MyToolbarAlias;_Show

  4. #4
    Member
    Join Date
    2006-11
    Posts
    14
    Login to Give a bone
    0

    Arrow Re: Is there an easy way to have a Toolbar button call up another Toolbar?

    Hi, I have recently discovered just how to do this, and it is just as RobertB said. To create a toolbar with a button to open the Object Snap Toolbar (or any other), follow these instructions.

    1. Create a new toolbar that will contain the buttons to open the other toolbars. Set this toolbar to "On By Default: Show".
    2. Rename your Object Snap toolbar to OSnaps, because the macro below doesn't like spaces in the toolbar name.
    3. Create a new command with this as the macro: ^C^C^P-toolbar;OSnaps;show;^P
    4. Drag that new command onto your new toolbars toolbar from step 1.
    5. To open your OSnaps toolbar, click the command icon on your new toolbars toolbar. To close the OSnaps toolbar, click the tiny X on its title bar or right-click Close.

    These are the items on my Toolbars Toolbar:
    Customize... (I like to use the icon designed for the Dashboard)
    -
    OSnaps (my customized object snap toolbar)
    Text (my customized MText toolbar)
    Dimension (my customized 2D dimensioning and revisions toolbar)
    Tables
    Scales (my customized dimscale, ltscale, text height settings commands)
    Viewports
    Tools (includes buttons that open Properties, Design Center, Block Editor, XRefs, Tool Palettes, Sheet Set Manager, Markup Set Manager and QuickCalc)

    Attached is a screen shot of my workspace. On the left is the CUI highlighting the OSnaps command I created and showing the Toolbars toolbar. On the right are the actual toolbars.

    Another way I have saved screen space is by switching from the Model/Layout tabs to the Model/Layout icons, as can be seen along the bottom of my screen shot.
    Attached Images Attached Images

  5. #5
    AUGI Addict madcadder's Avatar
    Join Date
    2000-11
    Location
    Too far from the beach
    Posts
    1,054
    Login to Give a bone
    0

    Default Re: Is there an easy way to have a Toolbar button call up another Toolbar?

    To keep it simple...
    Replace the menugroup name and toolbar name with your own. Make a button with "TogTB" as the command.
    Code:
    (DEFUN c:togtb (/ |menugroups| |menugroup| |target| |toolbar| |state|
    		|visible|)
      (SETQ |menugroups| (VLA-GET-MENUGROUPS (VLAX-GET-ACAD-OBJECT)))
      (SETQ |menugroup| "n52")
      (SETQ |toolbar| "Pop-up Toolbar")
      (SETQ	|target| (VL-CATCH-ALL-APPLY
    		   'VLA-ITEM
    		   (LIST |menugroups| |menugroup|)
    		 ) ;_ end of VL-CATCH-ALL-APPLY
      ) ;_ end of SETQ
      (IF (EQ (TYPE |target|) 'vla-object)
        (PROGN
          (SETQ |visible| (VL-CATCH-ALL-APPLY
    			'VLAX-INVOKE-METHOD
    			(LIST
    			  (VLAX-GET-PROPERTY |target| "Toolbars")
    			  'item
    			  |toolbar|
    			) ;_ end of list
    		      ) ;_ end of vl-catch-all-apply
          ) ;_ end of setq
          (IF (EQ (TYPE |visible|) 'vla-object)
    	(PROGN
    	  (SETQ |state| (VLA-GET-VISIBLE |visible|))
    	  (IF (NOT (EQ |state| :VLAX-TRUE))
    	    (VLA-FLOAT |visible| 400 500 9)
    	    (VLA-PUT-VISIBLE |visible| :VLAX-FALSE)
    	  ) ;_ end of if
    	  (VLAX-RELEASE-OBJECT |visible|)
    	) ;_ end of progn
    	(PRINC (STRCAT "\n Cannot find the " |toolbar| " toolbar! ")
    	) ;_ end of PRINC
          ) ;_ end of if
          (VLAX-RELEASE-OBJECT |menugroups|)
        ) ;_ end of progn
        (PRINC
          (STRCAT "\n Cannot find the " |menugroup| " menugroup! ")
        ) ;_ end of PRINC
      ) ;_ end of if
      (PRINC)
    ) ;_ end of defun
    Longer answer later...

  6. #6
    AUGI Addict madcadder's Avatar
    Join Date
    2000-11
    Location
    Too far from the beach
    Posts
    1,054
    Login to Give a bone
    0

    Default Re: Is there an easy way to have a Toolbar button call up another Toolbar?

    You also need to change the VLA-FLOAT from 9 lines to how many you would like.

Similar Threads

  1. 2014: Using MTP w/ROTATE in toolbar button
    By straits58 in forum AutoCAD Customization
    Replies: 9
    Last Post: 2014-08-22, 11:36 AM
  2. Custom Toolbar Button
    By mvsawyer in forum AutoCAD General
    Replies: 2
    Last Post: 2009-12-23, 07:55 PM
  3. Would like Toolbar description to appear under toolbar button
    By danny.139703 in forum AutoCAD General
    Replies: 1
    Last Post: 2007-05-21, 05:47 PM
  4. E-mail toolbar button
    By jsr13 in forum AutoCAD Customization
    Replies: 9
    Last Post: 2005-08-08, 08:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •