02-15-2018
02:41 PM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
02-15-2018
02:41 PM
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)