Element.Location属性用来获取元素的位置,Location可以转化为LocationPoint和LocationCurve,如何这个元素是点,则转化为LocationPoint,如果是直线或者曲线则转化为LocationCurve
Wall w = new Wall(); Curve c=(w.Location as LocationCurve).Curve; Opening o = new Opening(); XYZ p = (o.Location as LocationPoint).Point;
时间: 2024-10-08 11:21:37