Script not found. Retrieve error message after opening a drawing.

Script not found. Retrieve error message after opening a drawing.

Anonymous
Not applicable
2,269 Views
5 Replies
Message 1 of 6

Script not found. Retrieve error message after opening a drawing.

Anonymous
Not applicable

After opening a drawing that includes an automated call of a script, some times we get an error due to the script is not found in the path.

Look at the attachment please.

I'm trying to work around this problem but I need to retrieve the error so I can save the script file name and look for the missing file. Want to automate this search.

 

Capture1 (2).PNG

john.vellek has embedded your image(s) for clarity

0 Likes
Accepted solutions (1)
2,270 Views
5 Replies
Replies (5)
Message 2 of 6

cadffm
Consultant
Consultant

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-2018-script-fails-scr-scr/td...

 

Same issue.

How you start Autocad with script switch  in detail?

 

 

Sebastian

0 Likes
Message 3 of 6

TheCADnoob
Mentor
Mentor

I'm not sure i understand how the drawing is calling the script. 

 

Also if you are having a problem with a script you might want to hop over to the customization forum

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bd-p/130

CADnoob

EESignature

0 Likes
Message 4 of 6

Anonymous
Not applicable

I did not find an answer to my original question. I found a workaround though. It involves using a couple of lisp commands, which I placed inside a new acaddoc.lsp file to rename all scripts in the folder as .scr.scr. This way, every time a drawing is opened the second extension is added and AutoCAD can run it. The downside is that the extension is added to all files with .scr extension in the folder, so I ended up with files with multiple scr extensions. I solved this including a second command in the acaddoc file to delete all files with more than two extensions. Not a perfect solution but it works most of the times.

0 Likes
Message 5 of 6

Moshe-A
Mentor
Mentor

@Anonymous hi,

 

i order to give you some help to sort this out you need to give us more info about how do you invoke AutoCAD?

what do you mean by 'automated call of a script' ?

Are you running some application?

can you explain why does it work only some times?

 

just to make it clear, the error you are getting is a result of calling AutoCAD with startup script that AutoCAD can not find. the call with script can come from a shortcut icon on your desktop you are using or from some batch file you invoke. either it's miss spell file name\path  or the file is not exist.

 

moshe

 

 

0 Likes
Message 6 of 6

Anonymous
Not applicable
Accepted solution

Here is a more detailed thread I've open in AUGI forum.

 

http://forums.augi.com/showthread.php?172491-How-to-get-error-message-text

 

The workaround works 99% of the time. It fails only if two users are opening a drawing at exactly the same time, which has only happened once or twice since I changed the accaddoc.lsp file to make it work better. I'm happy with this and will not keep looking for further improvements.

 

By the way, the other poster having the same problem is a coworker of mine.

 

The software provider (Siemens) so far has not show desires to fix this problem. They are trying to make us use a new software that is still being developed and has many bugs. We already tried it and we'd rather keep the one we have.

0 Likes