Pline from list of points

Discussion in 'AutoCAD' started by TCEBob, Jul 9, 2004.

  1. TCEBob

    TCEBob Guest

    After creating a list of 2d points ((a,b)(c,d)...) I'd like to feed it to the
    Pline command. That is, I thought I would. Maybe better just to create the new
    Pline from a template within the program?

    rs
     
    TCEBob, Jul 9, 2004
    #1
  2. TCEBob

    David Bethel Guest

    (command "_.PLINE")
    (foreach p point_list
    (command p))
    (command "")

    A lot of gotchas here tough.

    Elevation, thickness, layer ... all of those default to the current
    settings. -David
     
    David Bethel, Jul 9, 2004
    #2
  3. TCEBob

    andywatson Guest

    TCEBob...
    This will add a lightweight polyline to modelspace on your current layer, lst2dpoints being the list of 2dpoints.

    (setq plineObj (vlax-invoke (vla-get-modelspace
    (vla-get-activedocument (vlax-get-acad-object))) "addlightweightpolyline"
    (apply 'append lst2dpoints)))
     
    andywatson, Jul 9, 2004
    #3
  4. TCEBob

    TCEBob Guest

    Thank you both!

    rs
     
    TCEBob, Jul 9, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.