Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

Drawing lines in AutoCAD using a script.

Anonymous

Drawing lines in AutoCAD using a script.

Anonymous
Not applicable

Hi,

I have a large number of pairs of points. I want to draw a line segment between points in each pair. All coordinates are absolute coordinates. My script looks like the following:

line x1,y1 x2,y2

line x3,y3 x4, y4

and so on...

Each line ends with a space.

The coordinates were generated using a Matlab script and when lines are plotted in Matlab, I get the correct figure (a hexagonal lattice). However, in AutoCAD, I get broken lines around the boundary. I have already tried changing DYNPICOORDS to 1. Would be very grateful if someone can help me out.

Thanks.

AutoCAD_error_1.JPG

0 Likes
Reply
Accepted solutions (1)
5,412 Views
2 Replies
Replies (2)

Alexander.Rivilis
Mentor
Mentor
Accepted solution

You can set OSMODE to 0 before running script or use _none osnap before coordinates:

 

_LINE _none x1,y1 _none x2,y2

 

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Anonymous
Not applicable

Thank you very much. That works perfectly.