borgunit Posted August 9, 2008 Posted August 9, 2008 Compile the into a dvb project and then just load the dvb file. Read through VisualLisp help how to "Make an Application" within VisualLisp. Quote
MR MAN Posted August 13, 2008 Author Posted August 13, 2008 please borgunit can you explain more thanks Quote
GhostRider Posted August 13, 2008 Posted August 13, 2008 you could add statements in your acad.lsp file to load the lisps on startup. (load "DIVIDERS.lsp") where "DIVIDERS.lsp" is the filename of what you want to load, you can have as many as needed, just make sure the lisp files are in your autocad search path. Quote
borgunit Posted August 13, 2008 Posted August 13, 2008 Oops. I have made a mistake. I did not mean to write DVB. I meant VLX. Here are some links that might help. http://afralisp.net/vl/vl-comp.htm http://lazydrafter.blogspot.com/2006/08/edit-load-and-protect-your-lisp-files.html Quote
rkmcswain Posted August 13, 2008 Posted August 13, 2008 I agree with GhostRider. But here is one more way. This will load all the lisp files in a given directory. (setq dir "\\\\server\\share\\lisp\\") (foreach item (vl-directory-files dir "*.lsp" 1) (setq ret (load (strcat dir item) "failed")) (if (eq (type ret) 'STR) (princ (strcat item " failed to load")) ) ) Quote
Gringo Posted August 13, 2008 Posted August 13, 2008 why would you want all your lisps loaded in every drawing Doesn't this take up memory - or am i wrong saying that wouldnt you want to only load a lisp if its called something like (defun c:BKL () (load "BREAKLIN.lsp")(c:BKL)) (defun c:SHS () (load "BREAKLIN.lsp")(c:SHS)) or (defun c:ABC () (load "ABC.fas")(c:ABC)) Just lisp files have to be within acad search path or you can path it within the lisp i dont really know how but its something like (setq $PATH "Z:/STD-Civil/Acad-Files/Lisp-files/");;replaced as needed (defun c:BKL () (load (strcat $PATH "BREAKLIN.lsp"))(c:BKL)) (defun c:SHS () (load (strcat $PATH "BREAKLIN.lsp"))(c:SHS)) ;above is for acad lisp files or (defun c:ABC () (load (strcat $PATH "ABC.fas"))(c:ABC)) ;above is for acad fas files Which ever way - there are heaps. Quote
CAB Posted August 14, 2008 Posted August 14, 2008 I load on demand using autoload (AUTOLOAD "ViewportCopy" '("copyvplayers" "putvplayers")); Copy & Put VP Layers Quote
Kerry Brown Posted August 14, 2008 Posted August 14, 2008 I load on demand using autoload (AUTOLOAD "ViewportCopy" '("copyvplayers" "putvplayers")); Copy & Put VP Layers ditto ... load it WHEN needed only. Quote
Gringo Posted August 14, 2008 Posted August 14, 2008 cool i got some support.. yeah only load when needed.. Cab i didnt know about autoload.. I'll have a look into it.. well firstly is there anything wrong in the way i am doing it as posted above?? Quote
ASMI Posted August 14, 2008 Posted August 14, 2008 Inside Visual LISP Editor Project>New Project... , collect your 50 *.lsp files and build one *.fas file. Than (loas "my_50_lisps.fas") ant once. You can also rebuild your project (add/remove/change lisp files) any time you want. Quote
CAB Posted August 14, 2008 Posted August 14, 2008 Using your examples: (autoload "BREAKLIN.lsp" '("BKL")) (autoload "BREAKLIN.lsp" '("SHS")) (autoload "ABC.fas" '("ABC")) or (autoload "BREAKLIN.lsp" '("BKL" "SHS")) (autoload "ABC.fas" '("ABC")) or (autoload (strcat $Path "BREAKLIN.lsp") '("BKL" "SHS")) (autoload "ABC.fas" '("ABC")) Quote
T2L Posted August 14, 2008 Posted August 14, 2008 Pardon me, i'm confused Where do you put all these autoload? (in demand thing?) in acaddoc.lsp, acad.lsp or you just type it in the command line as you go along. Guys, please explain further. Thank you. Quote
CAB Posted August 14, 2008 Posted August 14, 2008 I recommend you create a lisp file. Maybe "MyAutoLoads.lsp". In it store all your AutoLoad statements. Then add this to your ACADDoc.lsp file (MyAutoLoads.lsp) Quote
T2L Posted August 14, 2008 Posted August 14, 2008 OK , i got that. If it finds one (acaddoc.lsp), it loads the file into memory. Now, this beg a questions like the other guy above. why would you want all your lisps loaded in every drawing Doesn't this take up memory - or am i wrong saying that How much memory does this file take? Does it slow down AC? Quote
CAB Posted August 14, 2008 Posted August 14, 2008 AutoLoad adds pointers into memory and not the lisp. Only if the user types the command to call the lisp for the first time will the lisp routine be added to memory. Quote
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.