polyline copy

Discussion in 'AutoCAD' started by yavid, Aug 16, 2004.

  1. yavid

    yavid Guest

    I need to write a lisp routine that will copy polyline objects only, how do I do this, any ideas?
     
    yavid, Aug 16, 2004
    #1
  2. yavid

    Jim Claypool Guest

    (setq ss (ssget '((0 . "LWPOLYLINE,POLYLINE")))) ; for user selection
    or
    (setq ss (ssget "x" '((0 . "LWPOLYLINE,POLYLINE")))) ; to select all

    (command ".copy" ss "" .........)

    do I do this, any ideas?
     
    Jim Claypool, Aug 16, 2004
    #2
  3. yavid

    yavid Guest

    thank you.
     
    yavid, Aug 16, 2004
    #3
  4. yavid

    yavid Guest

    is there a way to only copy the polylines from a certain layer?
     
    yavid, Aug 16, 2004
    #4
  5. yavid

    MP Guest

    use a filtered selection set?
     
    MP, Aug 16, 2004
    #5
  6. yavid

    Jim Claypool Guest

    (setq ss (ssget '((0 . "LWPOLYLINE,POLYLINE")(8 . "LAYERNAME")))) ; for
    user selection
    or
    (setq ss (ssget "x" '((0 . "LWPOLYLINE,POLYLINE")(8 . "LAYERNAME"))) ; to
    select all
     
    Jim Claypool, Aug 16, 2004
    #6
  7. yavid

    yavid Guest

    Thanks again.
     
    yavid, Aug 16, 2004
    #7
  8. yavid

    yavid Guest

    Ok I thought that had it but I was mistaken. The layer name is stored in a variable called polylayer so I assumed this would work:

    (setq ss (ssget '((0 . "LWPOLYLINE,POLYLINE")(8 . polylayer))))

    Unfortunetly it doesn't, I get an error that says:
    ; error: bad SSGET list value
     
    yavid, Aug 16, 2004
    #8
  9. yavid

    Jim Claypool Guest

    (setq ss (ssget (list (cons 0 "LWPOLYLINE,POLYLINE")(cons 8 polylayer))))

    a variable called polylayer so I assumed this would work:
     
    Jim Claypool, Aug 16, 2004
    #9
  10. yavid

    T.Willey Guest

    (setq ss (ssget '((0 . "LWPOLYLINE,POLYLINE")(8 . polylayer))))
    Try this instead
    (setq ss (ssget (list (cons 0 "LWPOLYLINE,POLYLINE")(cons 8 polylayer))))

    Tim
     
    T.Willey, Aug 16, 2004
    #10
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.