2016-11-09 120 views
0

我想設置元素與某個值之間的差距,以便尺寸清晰可見。請在屏幕截圖下方找到。牆面尺寸

目前看起來像這樣。

Currently it's looking like this

但我想實現像下面。

But I would like to achieve like below

回答

0

你實際上是在對線路的控制,當你創建維度。從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);