Paul,
The first is the toolbar and the second is the lisp file. This works for both 2002 and 2004. The lisp was given to me but unfortunetly I don't remember who. I apologise for not remembering. Now when someone gives me something I note it with the lisp file.
I use the same custom menu but different tool bar settings to conserve screen space.
**PROFILE_PAA
[_Toolbar("PROFILE_PAA", _Floating, _Hide, 865, 65, 18)] [_Button("Plumbing", "PROFILE-P.bmp", "ICON_32_MTEXT")]^C^C(load "f:/lisp/setprofile");(SetProfile "XP-DAPLUMB-04");(setvar "modemacro" (getvar "cprofile")) [_Button("HVAC", "PROFILE-V.bmp", "ICON_32_MTEXT")]^C^C(load "f:/lisp/setprofile");(SetProfile "XP-DAHVAC-04");(setvar "modemacro" (getvar "cprofile")) [_Button("Sprinklers", "PROFILE-S.bmp", "ICON_32_MTEXT")]^C^C(load "f:/lisp/setprofile");(SetProfile "XP-DASPK-04");(setvar "modemacro" (getvar "cprofile")) [_Button("PAA-Menu", "PROFILE-PAA.bmp", "ICON_32_MTEXT")]^C^C(load "f:/lisp/setprofile");(SetProfile "PAA-04");(setvar "modemacro" (getvar "cprofile"))
;Usage: (setprofile "Your profile name")
(defun SetProfile (pname)
(vla-put-ActiveProfile
(vla-get-Profiles
(vla-get-Preferences
(vlax-get-acad-object)
)
)
pname
 

(princ)
)
Dave Alexander
"paul.trotter" <> wrote:
Yes, please post sample code if you can. I know this is possible, I just need to know how to get started. Thanks.