簡體   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