ILoveMadoka Posted May 11, 2010 Share Posted May 11, 2010 I switch back and forth between two profiles all the time and was wondering in it is possible to do this via lisp? Wanting to create a shortcut to flip from one profile to the other and back again as needed. Something along the lines of Profile1 and Profile2. Is it as simple as a setvar? TIA!! Quote Link to comment Share on other sites More sharing options...
alanjt Posted May 11, 2010 Share Posted May 11, 2010 This should give you the information you're looking for. ) Quote Link to comment Share on other sites More sharing options...
JohnM Posted May 11, 2010 Share Posted May 11, 2010 this is what i use for mt 2D and 3D profile switch just change the 2D and 3D to your profile names (vl-load-com) (defun c:po (/ cpr) (if (= (getvar "cprofile") "3d") (setq cpr "2d") (setq cpr "3d") ) (if (= cpr nil) (setq cpr "2d") ) (vla-put-ActiveProfile (vla-get-Profiles (vla-get-Preferences (vlax-get-acad-object)) ) cpr ) ) ;_defun Quote Link to comment Share on other sites More sharing options...
alanjt Posted May 11, 2010 Share Posted May 11, 2010 Untested... (defun c:PTog (/ lst) (setq lst '("Profile1" "Profile2")) (vl-catch-all-apply (function vla-put-activeprofile) (list (vla-get-profiles (vla-get-preferences (vlax-get-acad-object))) (if (eq (getvar 'cprofile) (car lst)) (cadr lst) (car lst) ) ) ) (princ (strcat "Active Profile: \"" (getvar 'cprofile) "\"")) (princ) ) Quote Link to comment Share on other sites More sharing options...
ILoveMadoka Posted May 11, 2010 Author Share Posted May 11, 2010 Awesome guys!! Only thing better than a solution is having multiple solutions... Thanks much! Quote Link to comment Share on other sites More sharing options...
alanjt Posted May 11, 2010 Share Posted May 11, 2010 Awesome guys!! Only thing better than a solution is having multiple solutions... Thanks much! Makes life fun. You're welcome. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.