Move the element within the project by a specified vector.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.1090.0)
Syntax
C# |
---|
public bool Move(
XYZ translation
) |
Visual Basic |
---|
Public Function Move ( _
translation As XYZ _
) As Boolean |
Visual C++ |
---|
public:
bool Move(
XYZ^ translation
) |
Return Value
If the element is moved successfully then the method return True, otherwise False.
Remarks
Examples
CopyC#
bool MoveUsingLocationCurve(Autodesk.Revit.ApplicationServices.Application application, Wall wall)
{
LocationCurve wallLine = wall.Location as LocationCurve;
XYZ translationVec = new XYZ(10, 20, 0);
return (wallLine.Move(translationVec));
}
CopyVB.NET
Private Function MoveUsingLocationCurve(application As Autodesk.Revit.ApplicationServices.Application, wall As Wall) As Boolean
Dim wallLine As LocationCurve = TryCast(wall.Location, LocationCurve)
Dim translationVec As New XYZ(10, 20, 0)
Return (wallLine.Move(translationVec))
End Function
See Also