Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

DraftSight script - almost working...

Status
Not open for further replies.

jaapdesticker

Mechanical
Feb 10, 2012
2
0
0
NL
Hi,

I need to convert 20000 Autocad Drawings to pdf. At our site, we don't use Autocad, and I used a 1-month trial of Autocad to do the job. After some fiddling, I succeeded in writing a script that works. However, in the coming weeks (after expiration of Autocad), I´ll need to do some more pdf conversions. I did some modifications to the scr file in order to get it working on DraftSight, and everything works now EXCEPT the close command.
I use the line
close "n"
but Draftsight will keep coming with a Dialog "Save Changes to blabla.dwg?"
This way, DraftSight will not close the drawing, and probably run out of memory.
Does anyone know a trick that will make DraftSight listen to the close command properly??
See the complete scr listing at Thanks in advance,
regards, Jaap
 
Replies continue below

Recommended for you

I'm also new to DraftSight and am too working on a script. I noticed though that because you are printing to pdf (or converting) you are technically making changes to the existing .dwg file. To avoid having that msgbox pop up try to save the file before you close, if you do so then it will close automatically.

Type in QSAVE on the line above CLOSE

See if that works.
 
Hi,

thanks for the suggestion! I also tried this, but the script still stops. It does manage to open, print and close the first drawing, but it stops after that. The command line says "open", and if I press Enter, it asks what script file I want to run; as default it gives me the same script I just ran.
So my impression is that the close command terminates the script?!
Regards, Jaap
 
Status
Not open for further replies.
Back
Top