@Kent1Cooper wrote:
Are you talking about specifically Line entities only [pretty simple]...? ....
Wouldn't it be better to identify ... those that are not orthogonal, rather than those that are ?....
Here's something pretty basic that does that for all non-orthogonal Line entities [lightly tested]:
(defun C:LOFFO (/ liness offss line ldata); = Lines that are OFF-Ortho
(setq
liness (ssget "_X" (list '(0 . "LINE") (cons 410 (getvar 'ctab))))
offss (ssadd); selection set of Lines off-ortho [initially empty]
); setq
(repeat (setq n (sslength liness))
(setq
line (ssname liness (setq n (1- n)))
ldata (entget line)
); setq
(if
(not
(or
(equal (cadr (assoc 10 ldata)) (cadr (assoc 11 ldata)) 1e-6); X's equal
(equal (caddr (assoc 10 ldata)) (caddr (assoc 11 ldata)) 1e-6); Y's equal
); or
); not
(ssadd line offss)
); if
); repeat
(if (> (sslength offss) 0) (command "_.chprop" offss "" "_color" 2 "")); <--color as you prefer
); defun
It could, instead of changing their color, select/highlight/grip them, or turn them to Polylines and give them width to make them obvious, or change them to a distinct Layer, or probably some other possibilities.
Polylines are a lot more complicated. Presumably it would step along and check the orthogonality [is that a word?] of every segment [which isn't so hard], but then what should it do if it finds one that's off? Draw a Line along it and change that for noticeability? Change the width of that segment to make it stand out? Something else? Presumably you wouldn't want the entire Polyline "featured," because that wouldn't tell you which segment(s) in it is/are off.
Another thing to consider: It could be made to ignore Lines that are far enough away from orthogonal [such as 45 degree angles] that obviously they don't need to be "fixed," but you would need to suggest a criterion for that -- more than 1 degree off, or more than 5 degrees off, or something. On the other hand, it wouldn't be too hard to also find things that are close to but not exactly on, say, any 15-degree multiple, not just those that are slightly off of orthogonal.
There are routines on these Forums to do the fixing for you, some that force everything to orthogonal or multiple-of-some-increment directions [as I recall, Rotating Lines about their start points or maybe midpoints], and some that force all endpoints to fall on snap-grid positions of whatever precision you want [which would often fix things that are slightly off, though depending on the details could take some a little further off, but at least they'd be more noticeable that way] -- do a Search.
Kent Cooper, AIA