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

Script throwing up command errors randomly

30 REPLIES 30
SOLVED
Reply
Message 1 of 31
nikkilawsonPLKEN
1688 Views, 30 Replies

Script throwing up command errors randomly

Hi all,

 

I am fairly new to the whole Forum thing and have no idea if this is the right place to ask this? But, I am encountering a very annoying issue that I would immensely appreciate assistance with.

I am currently using AutoCAD LT 2022 and am trying to run a script that I have made. It only works some of the time and the other 80% of attempts end in "Unknown command "o,o". Press F1 for help" I understand where the "0,0" is in my script, I just have no idea why it causes the error. The script up until that point is:

_cutclip
all

_pasteclip
0,0

 

Which as you can, see should be incredibly simple. But, only works every so often. This is driving me mental! I am attempting to automate an amendment on about 1,000+ old drawings and at this rate it would be faster to do it manually!

The only thing I could think is if it is to do with my work PC being slow of late? It runs almost constantly at 100% disk usage and freezes a lot! Maybe that could be throwing the script out of rhythm? Other than that, I have no leads to go from.

 

Thank you in advance for any assistance!

30 REPLIES 30
Message 21 of 31
nikkilawsonPLKEN
in reply to: hwalker

These drawings are so old, outdated and simple that they may as well be blank. I will give it a try and see if I have any luck though.

Message 22 of 31
hwalker
in reply to: nikkilawsonPLKEN

Try an AUDIT on them as well and answer YES if you want to fix any errors.

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 23 of 31
nikkilawsonPLKEN
in reply to: hwalker


@hwalker wrote:

Have you tried it on a completely blank drawing? 

e.g. just draw a rectangle in paper space and then run the script and see what happens.

Then run it on a template drawing and see what happens.

It might be that something in some of your drawings is messing up the script.


I ran a few tests with a blank drawing that only contained a rectangle. It took a few more attempts for it to result in the fail, but surely enough it did still fail yes. So, a drawing with less geometry seems to respond to it better. This makes me think what I originally thought. It is quite possibly due to my PC's recent poor performance. My disk almost constantly runs at 100% and it causes freezing. Maybe the freeze is causing AutoCAD to skip the blank line in my commands, input _pasteclip where the blank should be, use 0,0 as the next command and result in a command error?

Message 24 of 31
nikkilawsonPLKEN
in reply to: hwalker

I have tried the Audit on a few drawings now also. It hasn't found any errors on any of them yet and also hasn't stopped the .scr from failing to run.

I am incredibly grateful for everything you are doing to assist me! And everybody else too. You are all extremely helpful!

Message 25 of 31
hwalker
in reply to: nikkilawsonPLKEN

If you can would it be possible to post one of the affected drawings so we can try running the script ourselves on the drawing

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 26 of 31
hwalker
in reply to: nikkilawsonPLKEN

Yeah it does sound like the PC is having problems. Get your IT guys to see what's making it run at 100%

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 27 of 31
nikkilawsonPLKEN
in reply to: hwalker

I asked IT about it a while ago now. Just waiting for something to be done to fix it. I guess its hard with larger problems because we work the same shift and I need my PC to do my job. So, he cant really access it for long enough to investigate. Apparently I have an SSD being installed next week, hopefully that will help a little.

I have attached a random drawing file from the list of drawings I am having issues with. As old, unusual and poorly drawn as these things are, I honestly dont think it is the drawing file itself that is at fault. I do appreciate you taking a look at it though.

Message 28 of 31
hwalker
in reply to: nikkilawsonPLKEN

Yeah it does look like it's your PC. I just ran your script on the drawing and it failed at the layout command which I expected.

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 29 of 31
nikkilawsonPLKEN
in reply to: hwalker

OK, well at least I only have one more week of this to get through before something is done about it. I was hoping it was going to be something AutoCAD related and somebody would be able to help me fix it immediately. Sadly things never quite work out that way. I will report back here after my PC has been upgraded and let you know if the issue has been resolved or not. 

Thank you all again for everything you have done to assist!

 

Message 30 of 31

Also I tried to leave a like on all of the messages to show that I appreciate the assistance. Apparently I shouldn't have done this!

nikkilawsonPLKEN_0-1627987794942.png

Apologies if I flooded you all with notifications, I thought I was being helpful! I will go back to not understanding forum etiquette and stop bothering you all for a while now, haha.

Message 31 of 31
nikkilawsonPLKEN
in reply to: hwalker

Just a quick update on this one. My PC was upgraded today (had an SSD installed) and now it works PERFECTLY 100% of the time. It does appear that when running a script, if the PC freezes due to high Disk usage, errors occur! Could be something worth mentioning to AutoDesk themselves. Not sure how they could get around it, or if many people would even be affected (possibly a lot of people, if Windows keeps churning out updates!), but could still be useful information. Maybe if AutoCAD had a way to wait for the next command if the PC doesnt respond, opposed to hammering through commands at the speed of sound. Maybe a 'Slow Mode' setting?
I don't know, my issue is resolved, that is all that mattes to me!
Thank you again everybody who assisted / offered advice regarding this. I appreciate your help immensely!

Nik.

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

Post to forums  

Forma Design Contest


Technology Administrators