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: 

Error in script file

4 REPLIES 4
Reply
Message 1 of 5
BobStarling
799 Views, 4 Replies

Error in script file

I am a developer for a program that outputs a simple script to allow radiation results to be superimposed on a plot plan. I am currently testing this in an evaluation copy of AutoCad 2012LT.

 

I am testing in a new drawing. When I run the script file Radiation - Plan View.scr I do not get the expected output. It runs ok so far then the drawing becomes "corrupted". The distorted drawing is the same each time. The logfile shows no errors.

 

When I split the script into two, exactly the same instructions just split into two scripts part1.scr and part2.scr and run them separately I get the drawing I expect. Another script file with even more lines seems to run without errors so I don't think its a simple question of too many lines.

 

Anyone any ideas? All files named are in the attached zip file

Tags (1)
4 REPLIES 4
Message 2 of 5
pendean
in reply to: BobStarling

FYI, Layer>Make does everything you need and you don't need LAYER>NEW first. MAKE creates a new layer and makes it current, or if it exists, makes it current only.

 

Looking at your logfile, you have a non-command typed in that returns an error and kills your script file:

 

Command: _stopscript Unknown command "STOPSCRIPT".  Press F1 for help.

 

Attached is a test DWG file running your longer unedited script, seems to work just fine and not lock up AutoCAD or corrupt the file.

 

Can you post one of your files after this script is run?

Message 3 of 5
BobStarling
in reply to: pendean

Thanks for taking the time to look at this.

 

I was unaware that Make would create a layer if needed - thanks for this. The _stopscript error I guess I was ignoring for the present but removing it doesn't help. I did the original script development on an AutoCad clone which may explain this.

 

The drawing you attached shows the output I would expect, though the text is rather small - due to my not overriding default settings for this I think.

 

The attached drawing shows what I get when running the long script. When I run it in two parts I get the expected output that you saw. As you will see the long script seems to break down part way through even though the log file (original message) shows no errors.

Tags (1)
Message 4 of 5
BobStarling
in reply to: BobStarling

Continuing to investigate. It seems that the original script works fine if I choose the template acadlt.dwt but not if I choose the default acadltiso.dwt.

 

It also works if I create my script file with dimensions in mm rather than m. 

 

I'm confused.

Message 5 of 5
pendean
in reply to: BobStarling

Since I don't use ISO dwg files, that explains why it worked for me too.

 

Metric vs. imperial, what's in your script file that taps the wrong support (non-iso) files? ISO templates tap the ISO linetype and hatch pattern files for example.

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

Post to forums  

Autodesk Design & Make Report

”Boost