Hey All
I am attempting to make a function to check all objects between 2 points.
it needs to check their layers to see if it is an impassable object, eg: *Wall*,*Glaz*,*Struct*.
This is what I have so far but it is returning unpredictable data.
Code:
(defun ClashDetection ( pt1 pt2 )
(if (setq s (ssget "_F" (list pt1 pt2)))
(progn
(setq i 0
n (sslength s)
check nil
)
(repeat n
(setq e (ssname s i)
x (cdr (assoc 8 (entget e)))
WIP (if (/= nil (wcmatch (strcase x) "*GENM*,*WALL*,*WALL,*GLAZ*,*GLAZ"))
(setq check "T")
)
i (1+ i)
)
)
)
)
print check
)
(defun c:ffs ()
(setq ptstart (getpoint)
ptend (getpoint)
printout (ClashDetection ptstart ptend)
)
princ printout
)
Any Help would be greatly appreciated.
Cheers