Wednesday, May 2, 2007

Visible state of a Toolbar using AutoLISP

I got an email from a person that wondered how to "provide the state of a toolbar, either Hide or Show" using AutoLISP.

Here is how it can be done.

; Returns :vlax-true if visible and :vlax-false if not visible ; Example: (ax:ToolbarState "ACAD" "Draw") (defun ax:ToolbarState (MenuGroupName ToolBarName) (vl-load-com) (vla-get-visible (vla-item (vla-get-toolbars (vla-item (vla-get-menugroups (vlax-get-acad-object)) MenuGroupName)) ToolBarName)) )

No comments:

Post a Comment