CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

?
CAD discussions, advices, exchange of experience

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.
This is a peer-to-peer forum. The forum doesn't replace the official direct technical support provided by ARKANCE for its customers.
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

Arkance Systems CZ

Joined: 26.Jul.2007
Location: Czech Republic
Using: Autodesk software
Status: Offline
Points: 2124
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)
ARKANCE - https://arkance.world - Autodesk Platinum Partner
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

Arkance Systems CZ

Joined: 26.Jul.2007
Location: Czech Republic
Using: Autodesk software
Status: Offline
Points: 2124
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)
ARKANCE - https://arkance.world - Autodesk Platinum Partner
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,262 seconds.