Registered forum members do not see this ad.
I have a question when making a script file for a
batch process.
How can I allow for a drawing with multiple tabs?
Below is the standard code for making a script file
and running. It works fine if there is only one tab per
drawing file, but not if there is more than one tab.
Thanks if anyone can help
Code:(foreach file DwgtoCleanLst (setq dwgName (strcat "\"" DirPath file "\""));path and drawing of drawing to be processed in loop (write-line "OPEN" scrFile) (write-line dwgName scrFile) ;;Below are commands to run on each drawing... (write-line "-PURGE ALL * NO" scrFile) (write-line ".ZOOM EXTENTS" scrFile) (write-line ".QSAVE" scrFile) (write-line "_.CLOSE" scrFile) );foreach (close scrFile) (command ".script" (strcat DirPath "BatchDwgs.scr")) ;run script
thanks alanjt - yes I meant zoom extents on each tab.
The problem is that DwgtoCleanLst list does not list dwg tabs. I have tried your
piece of code but it doesn't work. Do I place the foreach x (layoutlist) etc in the (foreach file DwgtoCleanLst....or something else?
Last edited by alanjt; 5th Sep 2009 at 11:06 pm.
Beautiful! and thank you thank you!!! and the fast reply!
So that's how it's done![]()
Hi,
Could someone help with a similar problem?
I want to run a long script over drawings with many tabs.
I have a lisp to switch tabs that runs the script, but when it finishes running the script on the first tab it stops?
Can anyone tell me why?Code:(foreach lay (layoutlist) (setvar "CTAB" lay) (command "filedia" "0" "script" "C:/Users/MN11706/Documents/Script/Old_drg_fix-Text.scr" (C:Old_drg_fix-Text)))
I thought the thread above might help, but when I tried listing all the commands in the lisp itself, it stopped at the SSX command and asked me to select objects on screen...
Last edited by miff; 2nd Jul 2012 at 01:44 am.
Registered forum members do not see this ad.
miff,
Please read the CODE POSTING GUIDELINES and edit your post.
“A narrow mind and a fat head invariably come on the same person” Zig Zigler
![]()
Bookmarks