Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to move a multi-segment group of dimensions as show in the figure below using this general code.
When run nothing happens and I don't get any errors. It just completes the command and keeps going. I must be missing something fundamental, but there is so little to change I just can't figure out what I am missing.
Element lastdime = GetLastElement(uidoc);
Dimension lastdim = lastdime as Dimension;
ElementId lastdimid = lastdim.GetTypeId();
Line dimLine = lastdim.Curve as Line;
XYZ dimEnd = dimLine.Origin;
XYZ temp = new XYZ(0, 10, 0);
XYZ Shift = dimEnd + temp;
using (Transaction tx = new Transaction(doc))
{
tx.Start("Move Dimension Above Pipe");
ElementTransformUtils.MoveElement(doc, lastdimid, Shift);
tx.Commit();
}
Solved! Go to Solution.