CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
Czech English Deutsch
Login/Register:
 Visitors: 1785 
RSS tips RSS channel - CAD tips
RSS discussion RSS channel - CAD discussion

Discussion Discussion forum

HelpCAD discussion

CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.

How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic Closedscripts AutoCAD2011 problem

 Post Reply Post Reply
Author
NAOb View Drop Down
Newbie
Newbie


Joined: 24.May.2012
Location: Germany
Using: AutoCAD2011
Status: Offline
Points: 2
Direct Link To This Post Topic: scripts AutoCAD2011 problem
    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

Back to Top
Vladimir Michl View Drop Down
Moderator Group
Moderator Group

CAD Studio a.s.

Joined: 26.Jul.2007
Location: Czech Republic
Using: Autodesk software
Status: Offline
Points: 1403
Direct Link To This Post 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)
CAD Studio - www.cadstudio.cz
(Autodesk reseller and developer)
Back to Top
NAOb View Drop Down
Newbie
Newbie


Joined: 24.May.2012
Location: Germany
Using: AutoCAD2011
Status: Offline
Points: 2
Direct Link To This Post 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.
Back to Top
Vladimir Michl View Drop Down
Moderator Group
Moderator Group

CAD Studio a.s.

Joined: 26.Jul.2007
Location: Czech Republic
Using: Autodesk software
Status: Offline
Points: 1403
Direct Link To This Post 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)
CAD Studio - www.cadstudio.cz
(Autodesk reseller and developer)
Back to Top

Related CAD tips:
Tip 8880:When opening a DWG file, AutoCAD opens also a second one - Drawing1.dwg
Tip 8852:Publish interactive 3D models on the web with Autodesk 360.
Tip 8677:Associative DWG table of line length totals (by layer).
Tip 7503:Autodesk 3ds Max keyboard shortcuts.
Tip 7238:Double-click edit stopped to work in my AutoCAD.


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 2,266 seconds.