求助多重引线问题
本帖最后由 d1742647821 于 2023-2-23 10:19 编辑找到原因了,会受到默认样式的影响
版主麻烦帮忙删贴
求助,为什么多重引线向左边点时位置与预期为止不一样呢?
public static MLeader Type1(Point3d basePoint,Point3d tagPoint,string textString,double textHeight)
{
var ml = new MLeader();
var n1 = ml.AddLeader();
var n2 = ml.AddLeaderLine(n1);
ml.AddFirstVertex(n2, basePoint);
ml.AddLastVertex(n2, tagPoint);
ml.LeaderLineType = LeaderType.StraightLeader;//引线格式-类型:直线
ml.ContentType = ContentType.MTextContent;//内容-多重引线类型:多行文字
ml.TextAttachmentType = TextAttachmentType.AttachmentBottomOfTopLine;//连接位置:第一行加下划线
ml.EnableDogleg = false;//水平基线:否
var text = new MText();
text.Contents = "{\\W0.7;"+ textString + "}" ;
text.LineSpacingStyle = LineSpacingStyle.Exactly;
text.LineSpacingFactor = 1;
//text.Location = tagPoint;
ml.MText = text;
ml.TextHeight = textHeight;
return ml;
}
子函数是这样写的
设置的第一行和最后文字连接位置改下 是默认样式的问题
页:
[1]