AutoCAD Architecture Forum
Welcome to Autodesk’s AutoCAD Architecture Forums. Share your knowledge, ask questions, and explore popular AutoCAD Architecture topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AutoCAD Script stops

4 REPLIES 4
Reply
Message 1 of 5
Lispler
280 Views, 4 Replies

AutoCAD Script stops

Not sure if this is the right place to post this, but I need help with my AutoCAD Script.


My main problem:

Running a script through several drawings, some of them are opened read only.

As a result the script will stop when it comes to save the file.

 

The drawings are on a network drive. No one else is opening the drawings. Restarting the script at the position it stoped solves the issue, but eventually stops at another drawing.

 

My first idea was to add a delay after closing drawing1 and before opening drawing2.
Like this:
_.open "D:\temp\test1.dwg"
close
Y
delay 5000
_.open "D:\temp\test2.dwg"
close
Y
delay 5000
_.open "D:\temp\test3.dwg"
close
Y

 

But then the script stops after closing test1.dwg and does not open any other drawing.

 

Hope someone sees the mistake I do and can help me out.

4 REPLIES 4
Message 2 of 5
pendean
in reply to: Lispler

SCRIPTS do not run all by themselves between DWG files: you need to find and use a 3rd party SCRIPT processor tool with your script(s) instead like https://www.google.com/search?q=autocad+batch+script+processor

Message 3 of 5
Lispler
in reply to: Lispler

Hello pendean,

thanks for your answer.

I found Script Pro 2.0 of Autodesk and it's quite handy. With this tool I get a list of the files where my script did not run through. But I still get the error of files opening read only. I also tried to add a delay via the settings menue but it seems not to solve the issue.

Message 4 of 5
pendean
in reply to: Lispler

read-only tags are from your OS, not the program: could be the files are located somewhere locked or your log-in does not allow you to edit/save.
Message 5 of 5
Lispler
in reply to: Lispler

Bevore I used ScriptPro I was watching my script running through the files. The it stops at e.g. Drawing3 cause it's open read only. Restarting the script with drawing 3 works fine. So the account has the right and there is no tag on the dwg.
I will procced with script pro and try to find a scheme in the "read only" appearance.
I will report if I find the reason.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report