scripts AutoCAD2011 problem
Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=7873
Printed Date: 22.Apr.2026 at 03:14
Topic: scripts AutoCAD2011 problem
Posted By: NAOb
Subject: scripts AutoCAD2011 problem
Date Posted: 24.May.2012 at 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,-10 500,900,0 layer setzen stick
_cylinder 0,-6.13672013486127,-5 3 a 0,226.439166442356,184.495269024905 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
************************************************
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?
Regards Norbert
|
Replies:
Posted By: Vladimir Michl
Date Posted: 29.May.2012 at 08:36
Your endpoints may get "osnapped" to the existing geometry. Try to switch off osnaps (OSNAP=0).
------------- Vladimir Michl (moderator) ARKANCE - https://arkance.world" rel="nofollow - https://arkance.world - Autodesk Platinum Partner
|
Posted By: NAOb
Date Posted: 29.May.2012 at 09:29
Thanks, it worked, even if it doesn't makes any sense. In this German installation of AutoCAD the osnap = ofang = F3 Thanks again.
|
Posted By: Vladimir Michl
Date Posted: 29.May.2012 at 09:53
If you mean that script-generated coordinates shouldn't be influenced by OSNAP, check the OSNAPCOORD variable (should be > 0).
------------- Vladimir Michl (moderator) ARKANCE - https://arkance.world" rel="nofollow - https://arkance.world - Autodesk Platinum Partner
|
|