Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

tramber
en respuesta a: Muhammed.OPERA

Well, the angle of a line has to be tested after the ssget has done its job.

I would have suggested to use FILTER instead of the Quickselection thing but the angle is not present as a criteria.

And, unfortunatly too, FILTER is not scriptable.

It brings us to lisp.

 

(defun c:sang45(/ sel selout cont)
  (sssetfirst nil)
  (setq sel(ssget '((0 . "LINE")))
    selout(ssadd)
    cont 0)
  (repeat(sslength sel)
    (setq line(ssname sel cont))
    (if(member(angle(cdr(assoc 10(entget line)))(cdr(assoc 11(entget line))))
          (list (/ pi 4)(* 5(/ pi 4))))
      (setq selout(ssadd line selout)))
    (setq cont (1+ cont))
    )
  (sssetfirst nil selout)
  (princ)
  )

Just type sang45

 (modified)