
(vl-cmdf "_.Script" (strcat (getenv "userprofile") "\\Documents\\Script. (prompt (strcat "\nScript File for " (itoa (length BlkLst)) " Files Created")) UserFile (getfiled "Choose a Folder to Process" Path "*" 16)īlkLst (vl-directory-files Path "*.dwg" 1)īlkLst (append blkLst (vl-directory-files Path "*.dxf" 1)) remove this if you don't use dxf filesį1 (open (strcat (getenv "userprofile") "\\Documents\\Script.scr") "w") (defun c:LTS (/ Path UserFile blkLst F1 FileName) Make script file for drawings in a folder Ran this on a folder that had over 5000 blocks had to Alt F4 because you cant stop once it runs or i don't know how. I think I did read that you can use VLA- commands between drawings in the way you want - wasn't any good for me - so you could have a go and see if you ca rework what you need just using that (try it forst with a simple VLA- command and see what happened)Ģ I hope you dont have epilepsy you know what i mean once you run this.ģ might want to wirte in a stopgap like if blkLst is over 20 in lenght ask if you want to continue That might help but you can't do it on open drawings.
WILL BRICSCAD LOAD LISP IN SUPPORT FOLDER UPDATE
If anyone know if you can alter open drawings with a script I'd like to update this. I think I needed to close each drawing before moving to the next one or something like that, I'd have to close the open drawings. The one drawback I have is I never managed to get it to work on open drawings - I tried a bit but never quite got there. Noting here that I made this up a while ago and forget how it works but I also know it is not in a fit state to share, sorry.
WILL BRICSCAD LOAD LISP IN SUPPORT FOLDER PLUS
In the script (tempscript.scr) I specify which drawings to open and close plus all the commands. Is the line that runs a script from a drawing and tempscript in this case is the filepath and script name (including. Lee Mac and others have script writing tools, and you can also look at the core console. I think since it is a script it works outside of the drawing and can then do stuff on several drawings. So in the past I have made up a script routine - open a drawing - do stuff - close a drawing - open the next drawing - and so on as a part of a script. you don't want the LISP to jump to drawing B and change things there. This makes sense if you consider you might have a complex LISP to run on drawing A so while it runs you switch to drawing B to do stuff.

If you switch from drawing A to drawing B you don't take the running LISP with you. Done, the texts were aligned based on the first selectedYou can. Select the base text from which the alignment axis will be obtained. As far as I understand it, in AutoCAD a LISP routine will only work in the drawing where it is called. Fire.zip-Lisp routine-Acad GAME- shoot at entities in your drawings.
