Message 1 of 6
translation parameter in ElementTransformUtils.MoveElement?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to move a selected Element to a new location (XYZ).
The translation parameter would be the vector from the origin to the new location, right?
The Element does not end up where expected.
Surely the new location should be (0.000000000, 0.227996169, 0.000000000), instead of (0.000000000, 0.227996169, 0.000000000)?
Code:
XYZ segment_midpoint_0 = locationCurve.Point;
ElementTransformUtils.MoveElement(doc, elem.Id, segment_midpoint_0.Negate());
XYZ segment_midpoint_1 = locationCurve.Point;
Result:
+ segment_midpoint_0 {(-31.409068165, 0.227996169, 0.000000000)} Autodesk.Revit.DB.XYZ
+ segment_midpoint_1 {(0.000000000, 0.227996169, 0.000000000)} Autodesk.Revit.DB.XYZ
