T O P I C R E V I E W |
eloquintet |
Posted - January 22 2007 : 09:35:26 AM I have a question I have written a script which does not contain a qsave but when i create the batch script it puts on in at the end. i have looked through all of my settings and can't figure out why it's doing this. i do not have anything in my post batch field and do not have saveas option checked. my script is working fine but halting after the first file because of this qsave. please help |
15 L A T E S T R E P L I E S (Newest First) |
eloquintet |
Posted - January 25 2007 : 5:46:18 PM FYI, I have yet to get this to work but don't have time right now to analyze it any further |
Admin |
Posted - January 23 2007 : 11:35:29 AM Hi, yes, other things being loaded can mess up the prompting in AutoCAD. Sometimes when functions have the same names in different lisps, they cause very strange things to happen.
Another thing you can try is a different set of drawings. I have seen some drawings misbehave (sometimes without any explanation), often when imported from some other CAD system that converted them to DWG. quote: I see how the test run works now but still not sure why it would be called test run when it's performing what i want but anyway
The "Test run" feature was added to allow a user to run a script on some files without saving the result. Hence "TestRun" the scripts functionality in a batch.
I hope this is progress!
Regards, Bill |
eloquintet |
Posted - January 23 2007 : 10:05:08 AM Bill,
I see how the test run works now but still not sure why it would be called test run when it's performing what i want but anyway Let's see I created the script and tried to run it first using open with dbmod option and only drawing1 opened so i switched to open Acouple of time when I ran it it completed the task but most of the time it froze at opening the second file? see script and command window below. Could the problems be coming from things loading on startup? I have a collection of lisp and vba loading from my acad.lsp? I believe i disabled them earlier and it still behaved the same so i set it to load again. any more thoughts?
; *************************************************************** ; HURRICANE 6.7.0 - SCRIPT CREATED 1/23/2007 : 9:55:29 AM ; *************************************************************** _OPEN "d:\Drawings\M-2630EM ONE CHRISTINA CRESCENT\COMPLETE SUBMISSION\DETAILS.dwg" _ZOOM E _QSAVE _OPEN "d:\Drawings\M-2464EM\M-2464EF\umdnj elevations.dwg" _ZOOM E _QSAVE
Command: _ZOOM Specify corner of window, enter a scale factor (nX or nXP), or [All/Center/Dynamic/Extents/Previous/Scale/Window/Object] <real time>: E
Command: _QSAVE
Command: _OPEN |
Admin |
Posted - January 22 2007 : 4:52:57 PM Yes, glad you mentioned it Steve... could be... but then there would be 2 instances of QSAVE in the compiled script, when the TestRun checkbox is unchecked!?
eloquintet, if you could also turn ON "Include Debug Comments" on the SETTINGS TAB, when you perform the tests above, and repost your output. (That feature will add the appropriate comments to indicate where the commands are coming from).
The important aspect is that you start off small, and try a simple script first. Once you get the hang of how the different features work, then move up to more complex scripts.
Looking forward to your response. Bill |
n/a |
Posted - January 22 2007 : 4:45:13 PM I've been watching this thread, trying to figure out what the problem might be. Bill, is it possible there might be a Qsave in the Settings tab that could be causing the difficulty? (...Probably too easy to be the actual cause of the problem, but I thought I'd throw it out there, since I hadn't seen any mention of it, yet.) |
Admin |
Posted - January 22 2007 : 4:36:15 PM quote:
so let me get this clear, in order to run this script without saving the test run box must be checked. i do not have the lt box checked and i am using autocad 2006
YES.
Ok... lets start from scratch...
First... simplify your script to something that is simple. Something like quote: ZOOM E
Without any leading or trailing spaces.
Then make sure the "SaveAS", "Test Run", and "Delay" checkboxes are all UNChecked.
Press the Create Script button, and view the output, make sure there IS A QSAVE in the output. Then CHECK the "Test Run" checkbox, and press the Create Script button, and view the output, your QSAVE should be missing.
UNCheck the "Test Run" checkbox, and click the "CREATE AND RUN" button, and AutoCAD should start, and the script should run through.
Please confirm. |
eloquintet |
Posted - January 22 2007 : 2:56:34 PM ok when i run the script it opens autocad to drawing1 and i get this in the text window. i believe this was why i began using just open. what is causing this error?
Command: (if (/= (getvar "DBMOD") 0)(command "_.OPEN" "_Y")(command "_.OPEN")) _.OPEN Enter BACKSPACE to interrupt script.
Command: _Y Unknown command "Y". Press F1 for help. |
eloquintet |
Posted - January 22 2007 : 2:32:34 PM my user script window looks exactly like this no qsave
(if (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
(foreach ps '(("d-prot-500ps" nil 1) ("d-prot Xerox510" t 5) ("d-prot-800" nil 1) ("small_copy" nil 3) ("HP LASER 11x17" nil 1))
(setq *ptdebug* t)
(sub_plottabs (list (car ps) (nth 2 ps) "Tab" (cadr ps) nil t t "~" nil nil t T "" "*"))
)
(princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
)
so let me get this clear, in order to run this script without saving the test run box must be checked. i do not have the lt box checked and i am using autocad 2006
i can't test the script at this moment as they are doing some electrical work in my office |
Admin |
Posted - January 22 2007 : 2:14:34 PM Then the only way a QSAVE is in your script, is if you put it there in your user script window or you DON'T have the "Test Run" box checked.
Also, please confirm you DO NOT have the "AutoCAD LT" checkbox checked on the "Tools-Options-Config" menus.
BTW - What version of AutoCAD are you running?
Thanks, Bill |
eloquintet |
Posted - January 22 2007 : 2:05:57 PM by the way i looked again and downloaded the latest version with the same results...hmmm |
eloquintet |
Posted - January 22 2007 : 2:02:59 PM when i have test run checked the batch script produced does not have a qsave in it but the script still stops after the first drawing. when i uncheck it the script shows a qsave. i have switched to open with dbmod, deleted the close from my script and deselected test run and when i generate the batch it still puts a qsave between them as shown before. when the script ends i don't get any error message in the text window it just tells me the printing is complete.my first thought was to upgrade to the newest version but i couldn't find any link to download it?
; ***************************************************************
; HURRICANE 6.5.13 - SCRIPT CREATED 1/22/2007 : 2:00:53 PM
; ***************************************************************
(if (/= (getvar "DBMOD") 0)(command "_.OPEN" "_Y")(command "_.OPEN"))
"d:\Drawings\M-2630EM ONE CHRISTINA CRESCENT\COMPLETE SUBMISSION\DETAILS.dwg"
(if (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
(foreach ps '(("d-prot-500ps" nil 1) ("d-prot Xerox510" t 5) ("d-prot-800" nil 1) ("small_copy" nil 3) ("HP LASER 11x17" nil 1))
(setq *ptdebug* t)
(sub_plottabs (list (car ps) (nth 2 ps) "Tab" (cadr ps) nil t t "~" nil nil t T "" "*"))
)
(princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
)
_QSAVE
(if (/= (getvar "DBMOD") 0)(command "_.OPEN" "_Y")(command "_.OPEN"))
"d:\Drawings\M-2464EM\M-2464EF\umdnj elevations.dwg"
(if (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
(foreach ps '(("d-prot-500ps" nil 1) ("d-prot Xerox510" t 5) ("d-prot-800" nil 1) ("small_copy" nil 3) ("HP LASER 11x17" nil 1))
(setq *ptdebug* t)
(sub_plottabs (list (car ps) (nth 2 ps) "Tab" (cadr ps) nil t t "~" nil nil t T "" "*"))
)
(princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
)
_QSAVE |
Admin |
Posted - January 22 2007 : 10:52:39 AM Ok... a couple of things... The "test run" as you describe is working properly. When the "Test Run" box is checked, your changes should not be saved (unless you put your own QSAVE in your script). If it is unchecked, then Hurricane adds it for you.
Can you upgrade to the newest version of Hurricane? That will bring you up-to-date.
Also, is there any reason you are not using the "OPEN with DBMOD" option in "Tools->Options->Prefs" tab? With that, you don't need to use the CLOSE, and with the "Test Run" box deselected, the QSAVE will be omitted, and AutoCAD should move on to the next file.
Lastly, what do the prompts in your "text window" say when the script stops?? Those are usually a really good indication of why the script is stalling.
Regards, Bill |
eloquintet |
Posted - January 22 2007 : 10:22:55 AM basically i am trying to run a lisp routine i have through this script which will behave like the publish command does only it will allow me to print to 6 different plotters with various plot settings. i can post the script but am not sure if the author wants me posting his lisp routine here. i hope this will be enough to analyze.
; ***************************************************************
; HURRICANE 6.5.13 - SCRIPT CREATED 1/22/2007 : 10:20:16 AM
; ***************************************************************
_SDI 0
_OPEN
"d:\Drawings\M-2630EM ONE CHRISTINA CRESCENT\COMPLETE SUBMISSION\DETAILS.dwg"
(if (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
(foreach ps '(("d-prot-500ps" nil 1) ("d-prot Xerox510" t 5) ("d-prot-800" nil 1) ("small_copy" nil 3) ("HP LASER 11x17" nil 1))
(setq *ptdebug* t)
(sub_plottabs (list (car ps) (nth 2 ps) "Tab" (cadr ps) nil t t "~" nil nil t T "" "*"))
)
(princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
)
close
Y
_QSAVE
_OPEN
"d:\Drawings\M-2464EM\M-2464EF\umdnj elevations.dwg"
(if (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
(foreach ps '(("d-prot-500ps" nil 1) ("d-prot Xerox510" t 5) ("d-prot-800" nil 1) ("small_copy" nil 3) ("HP LASER 11x17" nil 1))
(setq *ptdebug* t)
(sub_plottabs (list (car ps) (nth 2 ps) "Tab" (cadr ps) nil t t "~" nil nil t T "" "*"))
)
(princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
)
close
Y
_QSAVE |
Admin |
Posted - January 22 2007 : 10:10:31 AM Can you post your compiled script, so we can diagnose what the problem might be?
Thanks, Bill |
eloquintet |
Posted - January 22 2007 : 09:47:25 AM it's weird but if i check the test run box the qsave does not appear in the batch script butwhen it is unchecked it reappears again. even in the test run it does not process more than one drawing? |