I'm trying to compare a set of walls to see what level of intersection they have (if any). To test, I just have file with 4 walls in a square. The following code is run after adding each wall to a set called "WallSet" and copying it to "wset2". So essentially I'm comparing each wall to every wall in the project right now (including itself) so I would expect to get 4 "equal" and the rest "disjoint" or maybe "overlap". However, I am getting all 16 comparisons coming back as "equal". What am I missing about how this method works?
Code:
For Each w As Wall In WallSet
Dim cv As LocationCurve = w.Location
For Each w2 As Wall In wset2
Dim cv2 As LocationCurve = w2.Location
Dim r As Autodesk.Revit.Enums.SetComparisonResult = cv.Curve.Intersect(cv.Curve)
MsgBox(w.Name.ToString & " & " & w2.Name.ToString & ": " & r.ToString)
Next
Next