• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

multiple operations to perform in lisp

  • Thread starter Thread starter FabrizioV
  • Start date Start date

FabrizioV

Guest
save to all*, for work reasons I must perform the following:

- run a find&replace on multiple files simultaneously .dwg
- change the colors of a layer in common to multiple files without having to open every single file
- change system variables on a set of files without having to open them individually

thanks in advance

fab
 
of these days in senate they did not equal you as to "disappeared" :eek: :
what you're asking is easy to solve, just create a script and it's wrong to get help from some lisp routines, to change your files in sequence.
the script allows you to open a file, operate changes, save it, close it and move to the next, without human intervention.
find and replace? on the net, or here, find many examples.
Do you have to change color to a plan? (command "_layer" "_c" numbertuocolore "tuopiano"")
set variables? (setvar "novaluable" new value)
cappilet.xls allows you to perform individual operations on all files you want.
 
ciao rpor66, I admit I have sinned in introducing the subject better. I am now beginning to use lisp language and similar for work reasons so, unfortunately, I make confusion very easily. . .
I threw out a little this forum to find similar topics and started reading the guide "my lisp" of red juseppe...
despite this I thought of writing here to look for a comparison with those who know more about me and/or how you say you find suggestions and "easy solution" methods.
we proceed by order:
- I was asked to perform a find&replace on multiple files simultaneously both .dwg and .txt
I was able to install notespad++ and implement the following procedure
(1.create a folder that contains all .txt files to edit and lace notespad++
2. from the menu bar select search>trova.. .
3.select the tab "search in files"
4. set the path, fill out the field "find" and "replace with"
5.filters*
6.click on the comnando "replace in files"). My question therefore is: Is there something like that for .dwg?
"Do you have to change color to a floor? (command "_layer" "_c" numbertuocolore "tuopiano"") "how do I get the full code of any file and apply multiple file changes simultaneously? Consider that I have more than 100 so think in batch I think it is necessary.. . .
same speech for system variables!
realize that I still miss to understand how to apply the codes before even writing them and editating them

Please help!
I thank you so much for the answer and availability
fab
 
for editing text files I would have resorted to vba, autocad or excel, with a few lines of code you solve the problem, if you have no experience with this language it is ok also notepad++.
I attach you createscript.xls file set for your need, with the button <seleziona file=""> select the dwg where to operate and add them (no append), in the editing column (rpfind_m "find" "replace") replacing find with the text to be searched and replaced with the one to be replaced, you can add as many as you want from the next line, same discourse both for layer color change and for variable setting, always ends with _qsave and _close.
when you have completed the change, via the button <crea file="" script=""> indicate where to save the script and give it a name.
by autocad, through the script command start the created file.
If you're having trouble, I'm here.

Hi.

p.s.
for the layer color change, if there is the possibility that one of the dwg does not have the layer "tuopiano" you can set the creation of the same so as to avoid the error that would block the script. (command "_layer" "_m" "tuopiano"")</crea></seleziona>
 

Attachments

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
ciao
Back
Top