Acad ToolbarItem Object

The AcadToolbarItem object represents a single button or separator on an AutoCAD toolbar. A toolbar button can contain a macro to be executed when it is selected by the user, or it can contain a nested toolbar called a flyout. Separators can't contain macros or flyouts. The Macro property is used to add or change the button's associated macro.

AcadToolbarItem Object Methods

The AcadToolbarItem object supports the following methods. Name Description

AttachToolbarToFlyout Attaches the toolbar to a toolbar button defined as a flyout. To create a new button as a flyout, you must first use the AddToolbarButton method of the AcadToolbar object with the FlyoutButton parameter set to True. Only then can you attach the toolbar to the flyout using this method. Parameters: MenuGroupName As String and ToolbarName As String.

Delete Deletes a specified toolbar item. Note that you can only add or remove toolbar items when the toolbar is visible.

Name Description

GetBitmaps Gets the large and small bitmaps used as icons for the toolbar item. Parameters: SmallIconName As String and LargeIconName As String. The parameters require both the path and file name of the bitmaps.

SetBitmaps Sets the large (24x22 pixels) and small (15x16 pixels) bitmaps used as icons for the toolbar item. Parameters: SmallIconName As String and LargeIconName As String. The parameters require both the path and file name of the bitmaps.

+1 0

Post a comment