Message 1 of 6

Not applicable
12-13-2017
09:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi guys
I'd like to assign this Lisp routine to a button on the toolbar. I already created the button, but I don't know how to write the macro so that I can load and run this Lisp file.
File path: "Y:\ACAD_GLOBAL\2018\Init\init.lsp"
My Lisp Routine:
;Load Visual Lisp (vl-load-com) ;Import the "MYPROFILE" Profile from the Y:\ Drive (vl-catch-all-apply 'vla-importprofile (list (vla-get-profiles (vla-get-preferences (vlax-get-acad-object))) "MYPROFILE" "Y:\\ACAD_GLOBAL\\2018\\Profile\\MYPROFILE.arg" 1) ) ;Set "MYPROFILE" current (vla-put-ActiveProfile (vla-get-Profiles (vla-get-Preferences (vlax-get-acad-object)))"MYPROFILE") ;Set the "modemacro" sysvar to report the latest profile (SETVAR "modemacro"(STRCAT "PROFILE: $(getvar, cprofile)"))
I've been using acad.lsp to load this Lisp file on startup, which was the wrong approach because it delays the starting process and resets my cuix.
P.S.: It has to be a file. The file is located on a shared network and is being accessed to by multiple users but managed by one individual. "MyProfile" is regularly being updated, that's why we need all users to work with the same profile.
Thank you for any help.
Cheers,
Rimi
Solved! Go to Solution.