Pline get co-ords stop working

I have been using a simple entget method for the pline co-ords and its just stopped working.

(setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entlast)))) this returns only 1 point and its 0,0,0

(command "pline" "0,0" "2,2" "0,2" "")

Autocad multi dxf 10's
(entget (entlast))
((-1 . ) (0 . "LWPOLYLINE") (330 . ) (5 . "11C6C") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "DEFAULT") (100 . "AcDbPolyline") (90 . 3) (70 . 0) (43 . 0.0) (38 . 0.0) (39 . 0.0) (10 0.0 0.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (10 2.0 2.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (10 0.0 2.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (210 0.0 0.0 1.0))

Bricscad only 1 dxf 10 and wrong
(entget (entlast))
((-1 . ) (0 . "POLYLINE") (5 . "A1") (330 . ) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (370 . -1) (100 . "AcDb2dPolyline") (66 . 1) (10 0.0 0.0 0.0) (70 . 0) (40 . 0.0) (41 . 0.0) (71 . 0) (72 . 0) (73 . 0) (74 . 0) (210 0.0 0.0 1.0) (75 . 0))

You can see Autocad has multiple dxf 10's

I have other methods VLA, entnext but this was a simple one liner and its in lots of my code.

Any ideas why it has stopped working I am sure its in a variable somewhere.

Comments

  • ALANH
    edited September 2020

    Just retried in my older V19 not V20 and it works fine, so I have set something during programming. Still stuck.

    ((-1 . ) (0 . "LWPOLYLINE") (5 . "A2") (330 . ) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (370 . -1) (100 . "AcDbPolyline") (90 . 3) (70 . 0) (43 . 0.0) (38 . 0.0) (39 . 0.0) (10 124.0 64.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (10 244.44369756722 205.736783215706) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (10 440.84914421148 125.931391615458) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (210 0.0 0.0 1.0))

  • Its working now not sure but I think osnapz changed but have to close Bricscad and reopen to reset. Will try to find.

  • "POLYLINE" vs. "LWPOLYLINE"...
    You are creating 'heavy' polylines in BricsCAD. Look at the PLINETYPE variable.

  • Also, when passing points, make sure that object snap is not active !
    (setq oldOsmode (getvar "osmode"))
    (setvar "osmode" 0)
    (command ...)
    (setvar "osmode" oldosmode)

    and restore "osmode" afterwards :-)

  • Thank you for the comments.

    I have been programming Autocad for 30+ years so when something like this happens it gets hard to work out what has changed, nothing obvious, hence the simple test draw a "PLINE" then (entget (car (entsel "pick pline"))) and only 1 dxf 10 was appearing.

    I just used logfile from both versions and did a compare trying to find some thing different. Still not real sure which variable fixed problem.

  • As Roy mentioned, it is PLINETYPE which defines whether "old-style" or "lightweight" polylines are created;
    3D polyline is unaffected :-)
    many greetings !

  • That appears to be the answer I have no idea why it would change. Not in my code in some ones code I have tried to hep with.

    Thanks again.