Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

script code

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
428 Views, 5 Replies

script code

Hi, All...

 

How to write a simple script that loads lisps from a network location
without adding it is in the startup suit. (location is added in support file search path) Can anyone help me out with that?

 

my drive---T
Path-----Documents \my folder\Lisps
Lisp-------etr.lsp

comand----(defun c:Etr ()


I already added T drive in support directory

can anybody help me to solve this

Thanks

 

 

 



5 REPLIES 5
Message 2 of 6
rkmcswain
in reply to: Anonymous

Do you want to load multiple lisp files at startup?

If so, create a file named "Acaddoc.lsp" and place it in the TOP support file seach path

 

;;example

(load "mylisp")
(load "yourlisp")

; the next one is not in the support file search path
(load "\\\\server\\share\\location\\another_lisp")

 If you are wanting to load one at run time, say from a menu macro... then...

 

^c^c(if (not c:myfunc)(load "myfunc"))myfunc;

 

 

 

 

 

R.K. McSwain     | CADpanacea | on twitter
Message 3 of 6
Anonymous
in reply to: rkmcswain

Thanks for your reply...
but am using autoscript for working on multiple dwgs
so i need to get script language for call a lisp (am not good in lisp)
in this case how i can use your code

Thanks


Message 4 of 6
rkmcswain
in reply to: Anonymous


What is autoscript?

R.K. McSwain     | CADpanacea | on twitter
Message 5 of 6
Moshe-A
in reply to: Anonymous

Hi,

 

Save the following two lines to script file  <YourName>.scr

 

(load "t:\\Documents\\my folder\\Lisps\\etr.lsp")

ETR

 

but be aware that if the last code line in the lisp is:  (c:etr)

you do not need the second line

 

cheers

Moshe

 

 

Message 6 of 6
Anonymous
in reply to: Moshe-A

Hi Moshe..
Thanks ... for ur support
It is running

Thanks
Tdkhtr

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report