Jump to content
learner1230

batch a lisp in multiple drawing

Recommended Posts

learner1230

hi ,

 

i have approximately 1000 dwg files in my folder , and i have to run a lisp in  all of those files  , is there any easy way script or macro  for open files / run commands which i want / save & close file / open next dwg and the same procces for until finish all files ...

I tried a lot of exaples of script but nothing match

 

thank you for your help

Share this post


Link to post
Share on other sites
learner1230

thank you so much for your help, but what I do is open a drawing remplace texts save close and open next drawing, also the texts is different between files

and I want to do it with a script or macro visual basic if you have any idea.

thank you 

Share this post


Link to post
Share on other sites
maratovich

Have you watched Autoviewport ?
There is a function - Run script in many files.

Attach an example of what you want.

Share this post


Link to post
Share on other sites
learner1230

I attached a excel data and picture, what I want to is replace the old text by the new text and for that I want just copy the colonne E in excel to autocad, the script run, for that I had done a lsp for the function replace and it match good but for the routine open save close open the next I hadn't found a function loop script or what can I do to collecte between open replace save close 

Capture.PNG

sous_test.xlsx

Share this post


Link to post
Share on other sites
maratovich

 

Share this post


Link to post
Share on other sites
BIGAL
Posted (edited)

You could read a csv file dwgname,oldtext.newtext and write the script file.

 

You would pass the variables to a lisp (load "mytexter") (mytexter "oldtext" "newtext")

 

open dwg1
(load "mytexter")
(mytexter "oldtext" "newtext")
close
Y
open dwg2
……….

 

Edited by BIGAL

Share this post


Link to post
Share on other sites
learner1230

hello, I tried this like a .scr , but it just opend the file without replacing the text and saving 

batch scrpt.PNG

Share this post


Link to post
Share on other sites
BIGAL

Mytexter does not exist it is the name of your lisp file that you want to use to replace the text. Same with the new old text. I have no idea where the text is that you want to replace. 

 

A question to Maratovich can we populate the new old  from the excel noticed a button ? 

Share this post


Link to post
Share on other sites
maratovich
1 hour ago, BIGAL said:

A question to Maratovich can we populate the new old  from the excel noticed a button ? 

 

I did not quite understand (translation difficulties), but here is the video:

 

 

Share this post


Link to post
Share on other sites
ronjonp
Posted (edited)
7 hours ago, learner1230 said:

hello,https://www.kdmsoft.net/autoviewport.html match 

but maratovich just a perdiod of 8 days, I want to it for all time 

are you have a crack

 

Hahaha .. I think we all have cracks 😉.

He is the author of that software... if it helps your productivity you should pay for it! It's only $5 a year 🙄.

Edited by ronjonp

Share this post


Link to post
Share on other sites
BIGAL

Maratovich very good option I like answer to my question.

 

image.png.5195d1fc3d673743814c223e6f07c2d2.png

Share this post


Link to post
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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