asad112 发表于 2022-7-7 00:02:35

Script Issues: Not performing

I have searched around for a similar problem, but did not seem to findit. If anyone can point me to where this has been discussed, this threadcan be closed.
 
Anyways, I am about to pull my hair out. I haveused a program called Script Maker v. 1.0.4 to create simple batchscripts to update attributes in my title blocks that exist in multipledrawings.
 
This is the essence of the command:
 
PSPACE
GATTE
0,0
APPROVALDATE

Y
_QSAVE
CLOSE
 
Whenthose commands are generated on with a script containing the desiredfiles, for some reason the script malfunctions around the 7th drawing.
 
Today, I downloaded a demo of Hurricane for AutoCAD, which is a more user friendly program that does just about the same thing.
 
This is the script it generates:
 
(LOAD "C:/PROGRAM FILES (X86)/HURRICANE/LISP/TB_WIZ1.LSP")
;-------------
TB_WIZ1
"title-sheet"
approvaldate
09/19/12
REGEN
;-------------
 
Again, it works first few drawings (in this case the first three drawings), but malfunctions on the fourth drawing.
 
Thisis very frustrating because I had no problems with this on my previouscomputer. Now, on a new faster computer, I having these problems. I ameven having them on the exact same drawing files that had no issues onthe previous computer.
 
I have attached the text as it is executed in both versions.
 
Thanks!
 
Script1.txt
Script2.txt

ReMark 发表于 2022-7-7 00:11:22

Is it your feeling that the script is running too fast?Can a "pause" be built into a script?

asad112 发表于 2022-7-7 00:12:34

I have tried entering a 3 second delay after each set of related commands, it didn't seem to fix the issue. As a matter of fact, it just push off the problem to drawings later on in the sequence. It is so bizarre.

ReMark 发表于 2022-7-7 00:17:34

What version of AutoCAD were you running previously?

asad112 发表于 2022-7-7 00:25:30

The previous version was 2013. I am just using it on a new computer. But this script was also successful on 2009 and 2011.

ReMark 发表于 2022-7-7 00:27:06

Makes one wonder why then a new computer would have any influence over a script file.Weird.
 
You got me puzzled.

asad112 发表于 2022-7-7 00:32:55

I am thinking about just trying to reinstall AutoCAD, but that is such a pain.

Patrick Hughes 发表于 2022-7-7 00:37:21

It might be "crashing" if the drawing does not have the attribute in the drawing. Have you looked to see if the offending drawings do have it?

asad112 发表于 2022-7-7 00:43:59

Yeah, they all have the attribute. I confirmed this by going in manually and performing the commands and it worked fine.
 
Iam trying it now with Autodesk Script pro, and I am having better luckbecause it uses a timeout feature when a drawing is not responding. Fromthe 16 drawings in this set, #7 through #10 do not update. Oddlyenough, script pro shows a status of "failed" for the successfulupdates, and a status of "done" for the unsuccessful updates. Therefore,I think I have been able to narrow the problem down to this hookup:
 
I am certain that there is a block located at 0,0. Because when I going in manually and perform GATTE, and enter 0,0, it shows me all the attributes available for modification.

ReMark 发表于 2022-7-7 00:45:03

It sounds like you are making some progress at least.I hope it gets better.
页: [1] 2
查看完整版本: Script Issues: Not performing