Jump to content

Recommended Posts

Posted

I have loads of closed polylines and they have all got a different area. There are hundreds.

In the quick select box how would I specify to say select all polylines between a certain area say 100m2 to 500m2? I know to select polylines then area the equal to but what do I put in the box?

 

Thanks

Posted

Wouldn't you need "greater than" X and "less than" Y? In other words: a range.

Posted

Quick one:

 

(defun c:qs ( / ss )
 ;; © Lee Mac  ~  02.06.10

 (if (setq ss (ssget "_X" '((0 . "LWPOLYLINE"))))
   (
     (lambda ( i / e area )
       (while (setq e (ssname ss (setq i (1+ i))))
         (setq area (vlax-curve-getArea e))

         (or (< 100. area 500.)
             (ssdel e ss))
       )
     )
     -1
   )
 )

 (sssetfirst nil ss)
 (princ)
)

Posted
Quick one:

 

(defun c:qs ( / ss )
 ;; © Lee Mac  ~  02.06.10

 (if (setq ss (ssget "_X" '((0 . "LWPOLYLINE"))))
   (
     (lambda ( i / e area )
       (while (setq e (ssname ss (setq i (1+ i))))
         (setq area (vlax-curve-getArea e))

         (or (< 100. area 500.)
             (ssdel e ss))
       )
     )
     -1
   )
 )

 (sssetfirst nil ss)
 (princ)
)

 

What do I type in the command line to activate that lisp?

 

Thanks for that

Posted

Type in what is shown immediately after c: which in this case would be the letters qs.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...