我新建了一个itemtype,增加了一个属性,该属性为文本数组类型
然后,附加到纵断线上时,就会崩溃。这是bug还是我操作的不对?
8640.test2.dgn
请上传您的代码。
请参考下面代码:
public static void testItemtype() { long myid = 852; ElementId elId = new ElementId(ref myid); Bentley.DgnPlatformNET.Elements.Element el1 = Session.Instance.GetActiveDgnModel().FindElementById(elId); DgnFile dgnfile = Session.Instance.GetActiveDgnFile(); string namelib = "QLIB"; string itemtypename = "test"; Bentley.DgnPlatformNET.Elements.Element newElem = el1; Bentley.DgnPlatformNET.ItemTypeLibrary itemTypeLibrary = Bentley.DgnPlatformNET.ItemTypeLibrary.FindByName(namelib, dgnfile); Bentley.DgnPlatformNET.ItemType itemType = itemTypeLibrary.GetItemTypeByName(itemtypename); Bentley.DgnPlatformNET.CustomItemHost host = new Bentley.DgnPlatformNET.CustomItemHost(newElem, true); Bentley.DgnPlatformNET.DgnEC.IDgnECInstance item = host.ApplyCustomItem(itemType, true); item.ScheduleChanges(newElem); newElem.ReplaceInModel(el1); }
不用代码,手动操作就会崩溃
如果不是代码层面的,我帮您转到应用论坛,请稍等。
您好,请初始化一下软件,看看能否解决。
MS 初始化:https://communities.bentley.com/communities/other_communities/chinafirst/w/chinawiki/18625/microstation
Civil 软件也适用。