Jump to content

Recommended Posts

Posted

Compile the into a dvb project and then just load the dvb file. Read through VisualLisp help how to "Make an Application" within VisualLisp.

Posted

please borgunit can you explain more thanks

Posted

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.

Posted

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"))
 )
)

Posted

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.

Posted

I load on demand using autoload

(AUTOLOAD "ViewportCopy" '("copyvplayers" "putvplayers")); Copy & Put VP Layers

Posted
I load on demand using autoload

(AUTOLOAD "ViewportCopy" '("copyvplayers" "putvplayers")); Copy & Put VP Layers

 

ditto ... load it WHEN needed only.

Posted

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??

Posted

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.

Posted

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"))

Posted

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.

Posted

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)

Posted

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?

Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...