AIberto Posted October 26, 2014 Share Posted October 26, 2014 Source from : bbs.xdcad.org , by st788796 (defun XD::AutoStartup (path tf / Profiles allpro newnum AutoLoadpath) (vl-load-com) (if tf (progn (vla-getallprofilenames (vla-get-profiles (vla-get-preferences (vlax-get-acad-object)) ) 'Profiles ) (setq allpro (safearray-value Profiles)) ) (setq allpro (list (getvar "cprofile"))) ) (setenv "ACAD" (strcat (getenv "ACAD") ";" (vl-filename-directory path)) ) (if (wcmatch (getvar "acadver") "19.[1-9]*") (if tf (mapcar '(lambda (x / trpath) (setq trpath (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Profiles\\" x "\\Variables" ) ) (vl-registry-write trpath "Trustedpaths" (strcat (vl-registry-read trpath "Trustedpaths") ";" (vl-filename-directory path) "\\..." ) ) ) allpro ) (setvar "TRUSTEDPATHS" (strcat (getvar "TRUSTEDPATHS") ";" (vl-filename-directory path) "\\..." ) ) ) ) (mapcar '(lambda (x) (setq AppLoadPath (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Profiles\\" x "\\Dialogs\\Appload\\Startup" ) ) (setq NewNum (itoa (1+ (read (vl-registry-read AppLoadPath "NumStartup") ) ) ) ) (vl-registry-write AppLoadPath "NumStartup" NewNum) (vl-registry-write AppLoadPath (strcat NewNum "Startup") path ) ) allpro ) (princ) ) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 26, 2014 Share Posted October 26, 2014 Huh ? we share our autostart its on a network no need for lisp. 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.