Run lsp on several files

Run lsp on several files

Anonymous
Not applicable
516 Views
2 Replies
Message 1 of 3

Run lsp on several files

Anonymous
Not applicable

Hi all

I need some help to batch edit files

 

I have a scr file like this :

 

-----------

 

open
"C:\myfile1.DWG"
dxfout

 

16
close
open

"C:\myfile2.DWG"
dxfout

 

16
close

 

 

...etc

---------

 

 

and its working fine on many drawings to conver to dxf.

 

Now instead of converting to dxf, I want to run a lsp file on each drawing. Can I invoke the lsp script on the file from the within this scr?

0 Likes
517 Views
2 Replies
Replies (2)
Message 2 of 3

hmsilva
Mentor
Mentor

@Anonymous wrote:

Hi all

I need some help to batch edit files

 

I have a scr file like this :

 

-----------

 

open
"C:\myfile1.DWG"
...

Now instead of converting to dxf, I want to run a lsp file on each drawing. Can I invoke the lsp script on the file from the within this scr?


Hello jden77 and welcome to the Autodesk Community!

 

To run a .lsp file from a script, if the .lsp file is loaded, just add the command in your file for each open dwg, if the lisp is defined as a command, (c:lispcommand), is the lisp is defined as a function (lisp function).

A lisp command is defined as

(defun c:name (....

A function

(defun name (...

 

Hope this helps,
Henrique

EESignature

0 Likes
Message 3 of 3

Jonathan3891
Advisor
Advisor

Download scriptpro here

 

You can add a entire folder of drawings to edit.

 

All your script will need is this:

 

dxfout

16 

 


Jonathan Norton
Blog | Linkedin
0 Likes