{。
//获取和设置多重标题多行文字内容。
MText mtr tag = new MText();。
MtrTag,注释性=注释性状态,真实;。
string tag = UnitLabel,移除(位置,单位标签。count()-pos);。
MtrTag,内容=标签;。
ulBlkTblRec,upgrade open();。
。
db dictionary ml dictionary =(db dictionary)nml trans,GetObject(acCurDb,MLeaderStyleDictionaryId,OpenMode。for read);。
MLeader mtr lead = new MLeader();。
mtrLead = ulMldr,将()克隆为MLeader。
mtrLead,MLeaderStyle = mlDictionary,GetAt(“TGW汽车”);。
mtrLead,注释性=注释性状态,真实;。
mtrLead,MText = MtrTag。
mtrLead,MText.Location = ulMldr,多行文字位置;。
mtrLead,MText.Attachment = ulMldr,多行文字附件;。
mtrLead,MText.TextHeight = ulMldr,MText . TextHeight。
mtrLead,Layer = MtrLayNam。
。
ulBlkTblRec,append entity(mtr lead);。
nmlTrans,AddNewlyCreatedDBObject(mtr lead,true);。
nmlTrans,commit();。
}//end nml trans EDIT(John):添加了代码标记以提高可读性。
看看
Mleader 在复制后不保留文本高度 我已经断断续续地做了一个多月了,但我无法让它工作。我收到了许多建议和意见,但我仍然没有做对。我简直不知道下一步该何去何从。这是我所有的代码。还包括结果是什么。
感谢你们给我的所有帮助,我很抱歉我太笨了,没听明白。
我不知道我是如何偶然发现这一点的,但是,我试图将textheight指定给多行文字实体,而不是mleader。当我将高度指定给mleader.textheight而不是mleader.mtext.textheight时,它似乎可以工作,并且特性显示了图纸空间的正确文字高度。
现在进行更多测试以确保...
页:
1
[2]