AutoCAD 2010/2011/2012 DWG Format
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
inaccurate coordinate s
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
hi all.
I'm developing an application in c# and I use sendcommand to draw shapes and write text in autocad.
I use lisp to write text in autocad. here's an example :
ActiveDocument.SendCommand("(defun c:writeText() (Command \"text\" \"{0},{1}\" \"{2}\")));
ActiveDocument.SendCommand("writeText");
{0} and {1} are coordinates of the start of text and {2} is the text itself.
the problem is when text is drawn its start position is not what I passed to sendcommand SOMETIMES!
sometimes it is exactly written in the coordinate I specified, but sometimes it gets changed a little.
I checked autocad commandline and it recieves the parameters correctly everytime.
does anyone have any idea?
thanks in advance.
Solved! Go to Solution.
Re: inaccurate coordinate s
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
depending on country settings it may me the decimal-separator that makes troubles. E.g. for us we have a comma as sep and if you send now the coords with your syntax the result for X=10.1 and Y=20.2 would be
10,1,20,2 instead of 10.1,20.2
for the definition for one point. So we would have first to replace the comma to a point before we send a double-value (converted to string) to the command-line.
The second reason (always critical when using points-coords in SendCommands) is the objectsnap. E.g. if you have a line from 0,0 to 10,10 and you try to set a text at point 1,1 the object-snap "ENDPOINT" will result in ==> the text is positioned at 0,0 (and not at 1,1). So deactivate osnap first.
- alfred -
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Re: inaccurate coordinate s
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
thank you very much.
disabling objectsnap resolved the issue.

