Wall wall1 = doc.GetElement(uiDoc.Selection.PickObject(Autodesk.Revit.UI.Selection.ObjectType.Element, "")) as Wall;
Wall wall2 = doc.GetElement(uiDoc.Selection.PickObject(Autodesk.Revit.UI.Selection.ObjectType.Element, "")) as Wall;
Curve curve1 = (wall1.Location as LocationCurve).Curve;
Curve curve2 = (wall2.Location as LocationCurve).Curve;
IntersectionResultArray resultArray = null;
SetComparisonResult result = curve1.Intersect(curve2, out resultArray);
//获取相交点
XYZ point = null;
if (result.Equals(SetComparisonResult.Overlap))
{
foreach (IntersectionResult item in resultArray)
{
point= item.XYZPoint;
}
}