Autodesk.Revit.DB.FamilyPointLocation是一个表示族实例中点的位置的类。
FamilyPointLocation(XYZ point, ElementId referenceId, Transform transform)
使用点坐标、参考元素的ID以及变换构造FamilyPointLocation对象。
FamilyPointLocation(XYZ point, ElementId referenceId)
使用点坐标和参考元素的ID构造FamilyPointLocation对象。变换默认为单位矩阵。
Point
获取此FamilyPointLocation对象的点坐标。
ReferenceId
获取该FamilyPointLocation对象的参考元素的ID。
Transform
获取该FamilyPointLocation对象的变换。
Equals(Object)
判断该FamilyPointLocation对象是否与指定对象相等。
GetHashCode()
获取该FamilyPointLocation对象的哈希值。
GetType()
获取此实例的Type。
ToString()
返回此实例的字符串表示形式。
// 创建一个FamilyPointLocation对象
XYZ point = new XYZ(1, 2, 3);
ElementId referenceId = new ElementId(123);
Transform transform = Transform.CreateTranslation(new XYZ(4, 5, 6));
FamilyPointLocation familyPointLocation = new FamilyPointLocation(point, referenceId, transform);
// 获取属性
XYZ point2 = familyPointLocation.Point; // (1, 2, 3)
ElementId referenceId2 = familyPointLocation.ReferenceId; // 123
Transform transform2 = familyPointLocation.Transform; // (1,0,0,4; 0,1,0,5; 0,0,1,6; 0,0,0,1)
// 判断相等
bool isEqual = familyPointLocation.Equals(new FamilyPointLocation(point, referenceId)); // false