Display full version of the post: scripts AutoCAD2011 problem

NAOb
24.05.2012, 14:08
Hi,I'm trying to create a sundial (board, stick, shadow) for various locations with a script file. Coordinates are created by an Excel program and then copied into the script.When I write in the script (language is German)Three layers - board, lines & stick do exist already in the drawing:****************************************************layer setzen lines_line 0,0,0-22.2875183144474,321.778370435386,0_line 0,0,0-22.2875183144474,335.01274086895,0_line 0,0,0-22.2875183144474,376.256663758475,0_line 0,0,0-22.2875183144474,452.878332884713,0_line 0,0,0-22.2875183144474,582.031947045679,0_line 0,0,0-22.2875183144474,767.757653870612,0_line 0,0,0-22.2875183144474,884.034198085051,0****************************************************All is well, but when I start differently:****************************************************layer setzen board_box -500,-100,-10500,900,0layer setzen stick_cylinder 0,-6.13672013486127,-53a0,226.439166442356,184.495269024905layer setzen lines_line 0,0,0-22.2875183144474,321.778370435386,0_line 0,0,0-22.2875183144474,335.01274086895,0_line 0,0,0-22.2875183144474,376.256663758475,0_line 0,0,0-22.2875183144474,452.878332884713,0_line 0,0,0-22.2875183144474,582.031947045679,0_line 0,0,0-22.2875183144474,767.757653870612,0_line 0,0,0-22.2875183144474,884.034198085051,0************************************************The lines do not start from 0,0,0 as I would expect, but from a point near the stick. And the longest line does not make sense at all.Any idea where I go wrong?RegardsNorbert


Vladimir Michl
29.05.2012, 08:36
Your endpoints may get "osnapped" to the existing geometry. Try to switch off osnaps (OSNAP=0).

NAOb
29.05.2012, 09:29
Thanks,it worked, even if it doesn't makes any sense.In this German installation of AutoCAD the osnap = ofang = F3Thanks again.


Vladimir Michl
29.05.2012, 09:53
If you mean that script-generated coordinates shouldn't be influenced by OSNAP, check the OSNAPCOORD variable (should be > 0).