繁体   English   中英

墙尺寸

[英]Wall Dimensioning

我想将元素之间的距离设置为某个值,以便尺寸清晰可见。 请在屏幕截图下方找到。

目前看起来像这样。

目前看起来像这样

但我想实现如下。

但是我想实现如下

创建尺寸时,实际上可以控制线。 从Revit中提取一条线,然后对其进行变换并使其垂直于您感兴趣的线偏移:(给出dbView,一个参考数组和一条曲线)

//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);

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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