Location |
The LocationPoint type exposes the following members.
| Name | Description | |
|---|---|---|
| IsReadOnly | Identifies if the object is read-only or modifiable. (Inherited from APIObject) | |
| Point | The physical location of the element. | |
| Rotation | The angle of rotation around the insertion point, in radians. |
| Name | Description | |
|---|---|---|
| Dispose | Causes the object to release immediately any resources it may be utilizing. (Inherited from APIObject) | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| Move | Move the element within the project by a specified vector. (Inherited from Location) | |
| Rotate | Rotate the element within the project by a specified angle around a given axis. (Inherited from Location) | |
| ToString | Returns a string that represents the current object. (Inherited from Object) |
void LocationInformation(LocationPoint position) { String prompt = "The selected column location information:"; prompt += "\nPoint: (" + position.Point.X + ", " + position.Point.Y + ", " + position.Point.Z + ")"; prompt += "\nRotation: " + position.Rotation; TaskDialog.Show("Revit",prompt); } bool LocationRotate(Autodesk.Revit.ApplicationServices.Application application, Autodesk.Revit.DB.Element element) { bool rotated = false; LocationPoint location = element.Location as LocationPoint; if (null != location) { XYZ aa = location.Point; XYZ cc = new XYZ(aa.X, aa.Y, aa.Z + 10); Line axis = Line.CreateBound(aa,cc); rotated = location.Rotate(axis, Math.PI / 2.0); } return rotated; }