selection sets...

Discussion in 'AutoCAD' started by aaron weissner, Jan 19, 2004.

  1. how can i create a selection set of splines with a length of less than 1
    inch... do i need to calculate the start point and end point and create a
    list... i have a DXF files from a scanned image that has thousands of
    little lines (see below) that i want to delete...

    Select object: ((-1 . <Entity name: 40519178>) (0 . "SPLINE") (330 . <Entity
    name: 40089410>) (5 . "7B77") (100 . "AcDbEntity") (67 . 0) (410 . "Model")
    (8
    .. "CENTERLINE") (100 . "AcDbSpline") (210 0.0 0.0 1.0) (70 . 11) (71 . 3)
    (72 .
    12) (73 . 8) (74 . 0) (42 . 1.0e-010) (43 . 1.0e-010) (40 . 0.0) (40 . 0.0)
    (40
    .. 0.0) (40 . 0.0) (40 . 0.5) (40 . 0.5) (40 . 0.5) (40 . 0.5) (40 . 1.0) (40
    ..
    1.0) (40 . 1.0) (40 . 1.0) (10 1.6065 -2.83 0.0) (10 1.6065 -2.828 0.0) (10
    1.6075 -2.826 0.0) (10 1.6085 -2.825 0.0) (10 1.6085 -2.825 0.0) (10 1.6075
    -2.826 0.0) (10 1.6065 -2.828 0.0) (10 1.6065 -2.83 0.0))
     
    aaron weissner, Jan 19, 2004
    #1
  2. aaron weissner

    Mark Propst Guest

    something like:
    (defun DeleteShortSplines( / spSet i curve-obj splen)
    (setq spSet(ssget"x"'((0 . "SPLINE"))))
    (if spset
    (progn
    (setq i 0)
    (repeat (sslength spset)
    (setq curve-obj(vlax-ename->vla-object(ssname spset i)))
    (setq splen(vlax-curve-getDistAtParam curve-obj (vlax-curve-getEndParam
    curve-obj)))
    (if(< splen 1)
    ;do whatever
    (vla-delete curve-obj);for example
    )
    (setq i(1+ i))
    );repeat
    );pr
    );if
    )
    ???
    hth
    Mark
     
    Mark Propst, Jan 19, 2004
    #2
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.