Announcements

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

Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Drawing lines in AutoCAD using a script.

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
5410 Views, 2 Replies

Drawing lines in AutoCAD using a script.

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

2 REPLIES 2
Message 2 of 3
Alexander.Rivilis
in reply to: Anonymous

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

Message 3 of 3
Anonymous
in reply to: Alexander.Rivilis

Thank you very much. That works perfectly.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report