[MSCE C#]引线标注问题

如图,我自己生成了TextBlock,然后利用设置了DimensionStyle的相关参数后,生成了NoteCellHeaderElement,但发现文字直有一部分有引线,我需要整个文字下面都有下划线,该如何设置呢?

DgnFile dgnFile = dgnModel.GetDgnFile();
DgnTextStyle txtStyle = DgnTextStyle.GetSettings(dgnFile);

double uor = dgnModel.GetModelInfo().UorPerMaster;
double angle = Math.PI / 6;

double fontWidth = this.SheetScale * 0.0042 * uor;
double fontHeight = this.SheetScale * 0.006 * uor;

 TextBlockProperties blockProp = new TextBlockProperties(dgnModel);
ParagraphProperties paraProp = new ParagraphProperties(dgnModel);
RunProperties runProp = new RunProperties(txtStyle, dgnModel);
            
//blockProp.IsViewIndependent = false;
runProp.FontSize = new DPoint2d(fontWidth, fontHeight);

 TextBlock txtBlock = new TextBlock(blockProp, paraProp, runProp, dgnModel);
txtBlock.AppendText("站场通号电缆沟400mm(宽)×425mm(深)");
            
DimensionStyle dimStyle = DimensionStyle.GetSettings(dgnFile);
dimStyle.SetBooleanProp(true, DimStyleProp.MLNote_ShowLeader_BOOLINT);//显示引线
dimStyle.SetIntegerProp(1, DimStyleProp.MLNote_HorAttachment_INTEGER);//

//dimStyle.SetIntegerProp(0, DimStyleProp.MLNote_Justification_INTEGER);//文字水平对齐方式
//dimStyle.SetIntegerProp(0, DimStyleProp.MLNote_VerticalJustification_INTEGER);//文字水平对齐方式

DPoint3d[] pts = new DPoint3d[2];
pts[0] = new DPoint3d(point.X, point.Y) * uor;
pts[1] = new DPoint3d(point.X + vector.X * 50 , point.Y + vector.Y * 50) * uor;
NoteCellHeaderElement noteEle = new NoteCellHeaderElement(out Element leaderEle, txtBlock, dimStyle, dgnModel, pts);
noteEle.AddToModel(out leaderEle, dgnModel);

Parents Reply Children
No Data