BCOM.TextElement CreatePileSkewnessText(IPileProperty pileprop) { //double uorpermaster = app.ActiveModelReference.UORsPerMasterUnit; BCOM.Point3d centroidp = pileprop.PileTopPoint.Point3dToBCOMPoint3d(1e4 / uorpermaster); centroidp.Z = 0; // xy plane BCOM.Point3d zerop = app.Point3dZero(); BCOM.Point3d textelefirstpoisition = app.Point3dFromXY(pileprop.PileDiameter * 1e4 / uorpermaster, 0); BCOM.Matrix3d identitym = app.Matrix3dIdentity(); BCOM.TextElement textele = app.CreateTextElement1(null, Utilities.GetPileSkewnessString(pileprop.GetCosAlpha()), ref textelefirstpoisition, ref identitym); BG.DVector3d linevector = new BG.DVector3d(pileprop.PileTopPoint.Point3dToDPoint3d(), pileprop.PileBottomPoint.Point3dToDPoint3d()); double xyrotationRad = linevector.AngleXY.Radians; textele.RotateAboutZ(ref zerop, xyrotationRad); textele.Move(ref centroidp); return(textele); }