Community
Hello,i am new here,i want to ask a question
for example i have a hole in the wall , i want to use api to calculate the size of the hole and mark on the screen like diameter,can revit api do this?if it can,how to do that?
or not calculate,just read the attribute of the size and mark it on the screen
Thanks~~~~
You can try to create dimension
ReferenceArray curveRefs; DetailCurve newCurve; double len; Line boundLine; len = Common.LinesLength(boundPt1.X, boundPt1.Y, boundPt2.X, boundPt2.Y); boundLine = _document.Application.Create.NewLineBound(boundPt1, boundPt2); newCurve = _document.Create.NewDetailCurve(curSelView, boundLine); curveRefs = new ReferenceArray(); curveRefs.Append(newCurve.GeometryCurve.get_EndPointReference(0)); curveRefs.Append(newCurve.GeometryCurve.get_EndPointReference(1)); _document.Create.NewDimension(curSelView, boundLine, curveRefs);
You can apply the curve with your hole's diameter