简体   繁体   中英

Wall Dimensioning

I would like to set the gap from the element to some value so that the dimension would be clearly visible. Please find below the screen shot.

Currently it's looking like this.

目前看起来像这样

But I would like to achieve like below.

但是我想实现如下

You are actually in control of the line when you create the dimension. Take a line from Revit then transform it and offset it perpendicular to the line you're interested in: (Given a dbView and a reference array and a curve)

//create your line along the element you want to dimension
Line line = Line.CreateBound(locCurve.Curve.GetEndPoint(0), locCurve.Curve.GetEndPoint(1));

//Compute the perpendicular of that line (I took advantage of the fact that I was working in plan:
XYZ perpendicular = line.ComputeDerivatives(0.5, true).BasisX.CrossProduct(new XYZ(0, 0, 1));

//transform the line to the new offset location:
Line offsetline = line.CreateTransformed(Transform.CreateTranslation(perpendicular.Normalize())) as Line;

//Create the dimension.
revitDoc.Create.NewDimension(dbView, offsetline, aDimensionRefArray);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM