Visual LISP, AutoLISP and General Customization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
PLine lisp command just dont wark
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hello,
I'm asking for your help in a very simple but extremely fustrating issue.
I'm using List pline command to draw rectangulars.
Some of them are drawn correctly, but on some the vextex ends uo united. for example with the following command:
(command "PLINE" (list 9.65 10.35) (list 0.65 1.35) (list 1.35 0.65) (list 10.35 9.65) "close" )
I get a strait line instade of a rectangular.
Please help me.
P.S. I use Autocad 2012 for MAc.
Re: PLine lisp command just dont wark
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
ersegev,
perhaps something like
(command ".pline") (foreach Pt '((9.65 10.35) (0.65 1.35) (1.35 0.65) (10.35 9.65)) (command Pt)) (command "c")
EDITED
set "OSMODE" to zero and see if it makes difference
hope that helps
Henrique
Re: PLine lisp command just dont wark
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Dear Henrique
Eventually it was indeed the OSMODE.
I have no idea whay even when specifically entering vertex coordinates it insists on snaping them to other coordinates.
Any way once I turned OSMODE to 0 it worked great.
Many thanks for your help.
Eran
Re: PLine lisp command just dont wark
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
You're welcome, Eran
glad you got a solution
Henrique
Re: PLine lisp command just dont wark
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
ersegev wrote:Dear Henrique
Eventually it was indeed the OSMODE.
I have no idea whay even when specifically entering vertex coordinates it insists on snaping them to other coordinates.
Any way once I turned OSMODE to 0 it worked great.
Many thanks for your help.
Eran
another approach to consider is using entmakex.
(defun LWPoly (lst cls)
(entmakex
(append (list (cons 0 "LWPOLYLINE")
(cons 100 "AcDbEntity")
(cons 100 "AcDbPolyline")
(cons 90 (length lst))
(cons 70 cls)
)
(mapcar (function (lambda (p) (cons 10 p))) lst)
)
)
)
lst = point list/vertex coordinates
cls= Close/not close
Will work regardless of osmode settings, plus you can supply other properties such as layer, color, lineweight etc....
by adding the properties as an argument
(defun LWPoly (lst cls lay lw col)
....
)
HTH
Re: PLine lisp command just dont wark
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Once again,
Many manu thanks for the wonderful help.
Your solutions really inspire me.
Eran
