T O P I C R E V I E W |
480vmotor |
Posted - July 15 2014 : 2:48:50 PM Greetings,
I am using BricsCad V13 (x64). The following LISP file works fine on one drawing when I use it. It opens each Layout and makes the change in each one.
Attedit_Mult_Layouts.lsp
(defun Attedit_Mult_Layouts (/) (command "tilemode" off) (foreach layout (layoutlist) (setvar "ctab" layout) (command "zoom" "E") (command "attedit" "Y" "CUSTOMER TB-DSI_E1" "ISSUED" "*" "C" "40.3356,4.8266" "33.2901,0.0805" "Text" "R" "07/25/14" "") ); END foreach ); END defun
The script I use in Hurricane to open multiple drawings is
Attedit_Mult_Layouts.scr
(LOAD "K:/Cadr13/Lisp/Attedit_Mult_Layouts") (Attedit_Mult_Layouts)
When I use Hurricane to open multiple drawings, the changes are all made in the first drawing, and things stop right there and don't move on to drawings 2, 3, etc.
I assume I need to change something in the LISP program to get it to open the next drawing but I am not sure what. This setup works fine for other LISP/script combos where I am not opening multiple layouts, so I assume opening up multiple layouts has something to do with the problem but I haven't been able to fix it so far.
Thanks in advance for any ideas, Doug |
10 L A T E S T R E P L I E S (Newest First) |
Admin |
Posted - July 16 2014 : 1:16:58 PM Thanks for sharing the update! |
480vmotor |
Posted - July 16 2014 : 12:31:31 PM Well now I just ran the simplified LISP file with BricsCAD just using Zoom Extents in each layout and it worked on all 5 drawings. _QSave is in Hurricane.scr.
Maybe later in the day I will get on the other computer with the full version and tailor the original LISP file for Autocad that does an Attribute Edit in each layout and see If that works.
|
480vmotor |
Posted - July 16 2014 : 10:51:14 AM Just got done running a similar LISP file, using AutoCAD Full 2012 and Hurricane. The program zooms extents in each of 8 layouts. I picked 5 drawings. It worked on all layouts in all 5 drawings.
(defun Layouts_ZoomE (/) (command "tilemode" "0") (command "pspace") (foreach layout (layoutlist) (setvar "ctab" layout) (command "zoom" "E") ); END foreach ); END defun
Looking at Script -> View "Hurricane.scr" _QSAVE is in there.
So it looks to be a problem within BricsCAD V13 (X64).
Don't know if there is a workaround.
Thanks, Doug
|
480vmotor |
Posted - July 15 2014 : 6:20:13 PM I don't have QSAVE commands in the batch script because of whatever settings I have, at least when I am using scripts in AutoCAD LT 2015, Things get saved anyway by some miracle.
"Test Run" is unchecked
Tomorrow when another guy is back in the office, I will modify the LISP program for AutoCAD and try it on his full 2012 version.
Here are the results of F2:
: ._SCRIPT Script to run: C:/temptemp/hurricane.scr : _OPEN Drawing name: C:\temptemp\5382-1.dwg : (LOAD "K:/Cadr13/Lisp/Attedit_NES_Layouts")ATTEDIT_NES_LAYOUTS : (Attedit_NES_Layouts) : tilemode New current value for TILEMODE (Off or On) <Off>: : zoom Viewport is view-locked. Switching to Paper space. Zoom: In/Out/All/Center/Dynamic/Extents/Left/Previous/Right/Scale/Window/<Scale (nX/nXP)>: E Switching back to Model space. : pspace : attedit Edit attributes one at a time? <Y> Y Edit attributes of which blocks? <*>: CUSTOMER TB-DSI_E1 Edit attributes with these names <*>: ISSUED Edit attributes with this text <*>: * Select attributes: C First corner of crossing window: Invalid window specified. First corner of crossing window: 40.3356,4.8266 Opposite Corner: 33.2901,0.0805 Number of attributes selected: 1 Position/Angle/Text/Style/Color/Height/Layer/Next/pRev/Quit/<Next>: Text Change/<Replace> R New attribute text <Be Here Now>: Be Here Now Position/Angle/Text/Style/Color/Height/Layer/Next/pRev/Quit/<Next>: : zoom Viewport is view-locked. Switching to Paper space. Zoom: In/Out/All/Center/Dynamic/Extents/Left/Previous/Right/Scale/Window/<Scale (nX/nXP)>: E Switching back to Model space. : pspace : attedit Edit attributes one at a time? <Y> Y Edit attributes of which blocks? <*>: CUSTOMER TB-DSI_E1 Edit attributes with these names <*>: ISSUED Edit attributes with this text <*>: * Select attributes: C First corner of crossing window: Invalid window specified. First corner of crossing window: 40.3356,4.8266 Opposite Corner: 33.2901,0.0805 Number of attributes selected: 1 Position/Angle/Text/Style/Color/Height/Layer/Next/pRev/Quit/<Next>: Text Change/<Replace> R New attribute text <Be Here Now>: Be Here Now Position/Angle/Text/Style/Color/Height/Layer/Next/pRev/Quit/<Next>: : zoom Viewport is view-locked. Switching to Paper space. Zoom: In/Out/All/Center/Dynamic/Extents/Left/Previous/Right/Scale/Window/<Scale (nX/nXP)>: E Switching back to Model space. : pspace : attedit Edit attributes one at a time? <Y> Y Edit attributes of which blocks? <*>: CUSTOMER TB-DSI_E1 Edit attributes with these names <*>: ISSUED Edit attributes with this text <*>: * Select attributes: C First corner of crossing window: Invalid window specified. First corner of crossing window: 40.3356,4.8266 Opposite Corner: 33.2901,0.0805 Number of attributes selected: 1 Position/Angle/Text/Style/Color/Height/Layer/Next/pRev/Quit/<Next>: Text Change/<Replace> R New attribute text <Be Here Now>: Be Here Now Position/Angle/Text/Style/Color/Height/Layer/Next/pRev/Quit/<Next>: : zoom Viewport is view-locked. Switching to Paper space. Zoom: In/Out/All/Center/Dynamic/Extents/Left/Previous/Right/Scale/Window/<Scale (nX/nXP)>: E Switching back to Model space. : pspace : attedit Edit attributes one at a time? <Y> Y Edit attributes of which blocks? <*>: CUSTOMER TB-DSI_E1 Edit attributes with these names <*>: ISSUED Edit attributes with this text <*>: * Select attributes: C First corner of crossing window: Invalid window specified. First corner of crossing window: 40.3356,4.8266 Opposite Corner: 33.2901,0.0805 Number of attributes selected: 1 Position/Angle/Text/Style/Color/Height/Layer/Next/pRev/Quit/<Next>: Text Change/<Replace> R New attribute text <Be Here Now>: Be Here Now Position/Angle/Text/Style/Color/Height/Layer/Next/pRev/Quit/<Next>: : zoom Viewport is view-locked. Switching to Paper space. Zoom: In/Out/All/Center/Dynamic/Extents/Left/Previous/Right/Scale/Window/<Scale (nX/nXP)>: E Switching back to Model space. : pspace : attedit Edit attributes one at a time? <Y> Y Edit attributes of which blocks? <*>: CUSTOMER TB-DSI_E1 Edit attributes with these names <*>: ISSUED Edit attributes with this text <*>: * Select attributes: C First corner of crossing window: Invalid window specified. First corner of crossing window: 40.3356,4.8266 Opposite Corner: 33.2901,0.0805 Number of attributes selected: 1 Position/Angle/Text/Style/Color/Height/Layer/Next/pRev/Quit/<Next>: Text Change/<Replace> R New attribute text <Be Here Now>: Be Here Now Position/Angle/Text/Style/Color/Height/Layer/Next/pRev/Quit/<Next>: : zoom Viewport is view-locked. Switching to Paper space. Zoom: In/Out/All/Center/Dynamic/Extents/Left/Previous/Right/Scale/Window/<Scale (nX/nXP)>: E Switching back to Model space. : pspace : attedit Edit attributes one at a time? <Y> Y Edit attributes of which blocks? <*>: CUSTOMER TB-DSI_E1 Edit attributes with these names <*>: ISSUED Edit attributes with this text <*>: * Select attributes: C First corner of crossing window: Invalid window specified. First corner of crossing window: 40.3356,4.8266 Opposite Corner: 33.2901,0.0805 Number of attributes selected: 1 Position/Angle/Text/Style/Color/Height/Layer/Next/pRev/Quit/<Next>: Text Change/<Replace> R New attribute text <Be Here Now>: Be Here Now Position/Angle/Text/Style/Color/Height/Layer/Next/pRev/Quit/<Next>: : zoom Viewport is view-locked. Switching to Paper space. Zoom: In/Out/All/Center/Dynamic/Extents/Left/Previous/Right/Scale/Window/<Scale (nX/nXP)>: E Switching back to Model space. : pspace : attedit Edit attributes one at a time? <Y> Y Edit attributes of which blocks? <*>: CUSTOMER TB-DSI_E1 Edit attributes with these names <*>: ISSUED Edit attributes with this text <*>: * Select attributes: C First corner of crossing window: Invalid window specified. First corner of crossing window: 40.3356,4.8266 Opposite Corner: 33.2901,0.0805 Number of attributes selected: 1 Position/Angle/Text/Style/Color/Height/Layer/Next/pRev/Quit/<Next>: Text Change/<Replace> R New attribute text <Be Here Now>: Be Here Now Position/Angle/Text/Style/Color/Height/Layer/Next/pRev/Quit/<Next>: : zoom Viewport is view-locked. Switching to Paper space. Zoom: In/Out/All/Center/Dynamic/Extents/Left/Previous/Right/Scale/Window/<Scale (nX/nXP)>: E Switching back to Model space. : pspace : attedit Edit attributes one at a time? <Y> Y Edit attributes of which blocks? <*>: CUSTOMER TB-DSI_E1 Edit attributes with these names <*>: ISSUED Edit attributes with this text <*>: * Select attributes: C First corner of crossing window: Invalid window specified. First corner of crossing window: 40.3356,4.8266 Opposite Corner: 33.2901,0.0805 Number of attributes selected: 1 Position/Angle/Text/Style/Color/Height/Layer/Next/pRev/Quit/<Next>: Text Change/<Replace> R New attribute text <Be Here Now>: Be Here Now Position/Angle/Text/Style/Color/Height/Layer/Next/pRev/Quit/<Next>: nil
|
Admin |
Posted - July 15 2014 : 5:28:24 PM Seems like you don't have any QSAVE commands in your batch script. Please verify that you do NOT have the TEST RUN checkbox checked.
Uncheck the "Test Run" checkbox, recompile, and see if that runs through them.
Also, please include the F2 command window output, if things don't work out. Often the cause is shown in there.
Please advise. |
480vmotor |
Posted - July 15 2014 : 5:05:19 PM For comparison,
Here is the file started from a similar script that opens multiple drawings and calls another LISP program. All the drawings were opened and processed:
; *************************************************************** ; HURRICANE 6.8.17 - SCRIPT CREATED 7/15/2014 : 3:56:54 PM ; *************************************************************** _OPEN "C:\temptemp\5382-1.dwg" (LOAD "K:/Cadr13/Lisp/trmtnest_e1") (trmtnest_e1) ; << END OF USER SCRIPT >> ; << START OF POST-USERSCRIPT COMMANDS >> _CLOSE ; << END OF POST-USERSCRIPT COMMANDS >> _OPEN "C:\temptemp\5382-2.dwg" (LOAD "K:/Cadr13/Lisp/trmtnest_e1") (trmtnest_e1) ; << END OF USER SCRIPT >> ; << START OF POST-USERSCRIPT COMMANDS >> _CLOSE ; << END OF POST-USERSCRIPT COMMANDS >> _OPEN "C:\temptemp\5382-3.dwg" (LOAD "K:/Cadr13/Lisp/trmtnest_e1") (trmtnest_e1) ; << END OF USER SCRIPT >> ; << START OF POST-USERSCRIPT COMMANDS >> _CLOSE ; << END OF POST-USERSCRIPT COMMANDS >> _OPEN "C:\temptemp\5382-4.dwg" (LOAD "K:/Cadr13/Lisp/trmtnest_e1") (trmtnest_e1) ; << END OF USER SCRIPT >> ; << START OF POST-USERSCRIPT COMMANDS >> _CLOSE ; << END OF POST-USERSCRIPT COMMANDS >> _OPEN "C:\temptemp\5382-5.dwg" (LOAD "K:/Cadr13/Lisp/trmtnest_e1") (trmtnest_e1) ; << END OF USER SCRIPT >> ; << START OF POST-USERSCRIPT COMMANDS >> _CLOSE ; << END OF POST-USERSCRIPT COMMANDS >>
|
480vmotor |
Posted - July 15 2014 : 4:34:31 PM OK got it now,
; *************************************************************** ; HURRICANE 6.8.17 - SCRIPT CREATED 7/15/2014 : 3:18:15 PM ; *************************************************************** _OPEN "C:\temptemp\5382-1.dwg" Y (LOAD "K:/Cadr13/Lisp/Attedit_Mult_Layouts") (Attedit_Mult_Layouts) ; << END OF USER SCRIPT >> ; << START OF POST-USERSCRIPT COMMANDS >> _CLOSE ; << END OF POST-USERSCRIPT COMMANDS >> _OPEN "C:\temptemp\5382-2.dwg" (LOAD "K:/Cadr13/Lisp/Attedit_Mult_Layouts") (Attedit_Mult_Layouts) ; << END OF USER SCRIPT >> ; << START OF POST-USERSCRIPT COMMANDS >> _CLOSE ; << END OF POST-USERSCRIPT COMMANDS >> _OPEN "C:\temptemp\5382-3.dwg" (LOAD "K:/Cadr13/Lisp/Attedit_Mult_Layouts") (Attedit_Mult_Layouts) ; << END OF USER SCRIPT >> ; << START OF POST-USERSCRIPT COMMANDS >> _CLOSE ; << END OF POST-USERSCRIPT COMMANDS >> _OPEN "C:\temptemp\5382-4.dwg" (LOAD "K:/Cadr13/Lisp/Attedit_Mult_Layouts") (Attedit_Mult_Layouts) ; << END OF USER SCRIPT >> ; << START OF POST-USERSCRIPT COMMANDS >> _CLOSE ; << END OF POST-USERSCRIPT COMMANDS >> _OPEN "C:\temptemp\5382-5.dwg" (LOAD "K:/Cadr13/Lisp/Attedit_Mult_Layouts") (Attedit_Mult_Layouts) ; << END OF USER SCRIPT >> ; << START OF POST-USERSCRIPT COMMANDS >> _CLOSE ; << END OF POST-USERSCRIPT COMMANDS >>
|
Admin |
Posted - July 15 2014 : 4:17:28 PM Hi Doug,
To be clear, I'm looking for the compiled BATCH script... So please go to the menu called "Script", then click "View Hurricane.scr".
Cut and paste the contents into a response.
Thanks |
480vmotor |
Posted - July 15 2014 : 4:12:00 PM This is the whole script
(LOAD "K:/Cadr13/Lisp/Attedit_Mult_Layouts") (Attedit_Mult_Layouts)
Like I said, I use many scripts like this with Hurricane to call up LISP programs and they don't stall on the first drawing.
I also have AutoCAD LT 2015 on this machine, so I have to do all my LISP stuff with BricsCad.
Thanks, Doug |
Admin |
Posted - July 15 2014 : 3:43:01 PM Hi 480vmotor,
Seems like you are on the right track. (Assuming it isn't a "BricsCad" issue)
If you could cut-paste your "hurricane.scr" file into a message, I could attempt to diagnose further.
Thanks! |
|
|