Polylines Joining For No Reason
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have never run into this before, so I'm at a loss for why it's happening. I'm using AutoCad 2018 Vanilla in Windows.
My code adds lwpolylines on a layer at a certain width (50.0). It's like a grid with horizontal and vertical lwpolylines.
Then it turns off that layer and turns on, and sets, another layer. It creates more lwpolylines with a different width (280) at the exact same coordinates.
When it's done running, the lwpolylines on the first layer are gone. When I check the lwpolylines on the second layer, they have both widths.
This is a listing of one of the lwpolylines:
LWPOLYLINE Layer: "SOLDERMASK_BOTTOM"
Space: Model space
Handle = 1a21e
Closed
area 0.0000
perimeter 113600.0000
at point X=-35500.0000 Y=28400.0000 Z= 0.0000
starting width 50.0000
ending width 50.0000
at point X=-35500.0000 Y=-28400.0000 Z= 0.0000
starting width 280.0000
ending width 280.0000
This is the code used to create the lwpolylines:
(defun CreateLWPoly (plPntList plWidth openORclose)
(entmake (append (list (cons 0 "LWPOLYLINE")
(cons 100 "AcDbEntity")
(cons 100 "AcDbPolyline")
(cons 90 (length plPntList))
(cons 70 openORclose) ;closed(1) or open(0)
(cons 43 plWidth)
)
(mapcar (function (lambda (p) (cons 10 p))) plPntList)
)
)
)
If anyone has an idea why this happens, I'd appreciate it if you let me know. Thanks.