

- Will bricscad load lisp in support folder install#
- Will bricscad load lisp in support folder update#
(vlax-dump-object (vla-get-files (vla-get-preferences (vlax-get-Acad-object))) T) the gets are their for info maybe other use
Will bricscad load lisp in support folder install#
This sets a reference to the install path of your product
Will bricscad load lisp in support folder update#
resets the paths 2016 usefull for update versions of Autocad ( (setq r (strcat (apply 'strcat (mapcar '(lambda (x) (strcat x " ")) paths)) dir)) ) (apply 'strcat (apply 'append (mapcar (function (lambda (x) (setq i (1+ i)) (if (= i n) (list dir " " x " ") (list x " ")))) paths))) ( (progn (setq paths ((setq f (lambda ( s / i ) (if (setq i (vl-string-search " " s)) (append (list (substr s 1 i)) (f (substr s (+ i 2)))) (list s)))) where)) nil) ) ( (or (not (findfile dir)) (vl-string-search (strcase dir) (strcase where))) nil) check if its already there (so no duplicate) ( (progn (and (not (findfile dir)) (vl-mkdir dir)) nil) ) attempt to create the directory if it doesn't exist ( (not (vl-every '(lambda (x) (eq 'STR (type x))) (list dir where))) ) (defun InsertDir ( n dir where / f paths i r ) example: (setvar 'trustedpaths (InsertDir nil (acet-ui-pickdir) (getvar 'trustedpaths))) returns: string with the included directory at nth position where - (getvar 'trustedpaths) or (getenv "ACAD") or. n - position to insert, if nil - it would be the very last (setvar 'trustedpaths (InsertDir nil dir (getvar 'trustedpaths))) (setenv "ACAD" (InsertDir nil dir (getenv "ACAD"))) (foreach dir (mapcar '(lambda (x) (strcat dsktop x)) '("A" "B" "C")) (setq dsktop (strcat (getenv "userprofile") "\\Desktop\\")) I think this one would be better, since its more generic: (princ "\nLock2Block loaded - Command L2B and UNDOL2B are now available.\n") (if (not found) (setvar "TRUSTEDPATHS" (strcat trustedpaths " " appfolder))) (if (not found) (setq found (eq appfolder (substr trustedpaths (if startpos startpos 1))))) (while (and (not found) (setq endpos (vl-string-position (ascii " ") trustedpaths endpos))) (setq appfolder (Lock2Block-GetAppFolder)) (if (setq trustedpaths (getvar "TRUSTEDPATHS")) (lambda (/ trustedpaths appfolder startpos endpos found) (autoload (strcat (vl-string-translate "\\" "/" (Lock2Block-GetAppFolder)) "/" "Lock2BlockCmds") * "Lock2BlockCmds" is the lisp filename that implements the commands ( (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\Mprojekt\\Lock2Block" "InstallPath") ( (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\Mprojekt\\Lock2Block" "InstallPath") ( (vl-registry-read "HKEY_CURRENT_USER\\Software\\MProjekt\\Lock2Block" "InstallPath")

(cond Check all three possible registry locations I have Created Setup Program for my application.Īpplication install fine and first VLX File load on Startup.
