修改引用件程序如下,给各位也分享一下:
Dim acadapp As AcadApplication Dim mcadApp As McadApplication Dim idoc As IAcadDocument Set acadapp = GetObject(, "AutoCAD.Application.16") Set mcadApp = acadapp.GetInterfaceObject("Mcad.Application") Set idoc = acadapp.ActiveDocument Dim mpartref As McadPartReference Set mpartref = idoc.ModelSpace.Item(4) '此处取到一个引用件mcadpartref对象
Dim symbb As McadSymbolBBMgr Set symbb = acadapp.GetInterfaceObject("SymBBAuto.McadSymbolBBMgr")
Dim bommgr As McadBOMMgr Set bommgr = symbb.bommgr
Dim pdata() As String
pdata = mpartref .Data
pdata(0, 1) = "aaaa" pdata(1, 1) = "bbbbbb"
。。。。
bommgr.SetPartData mbom, pdata acadapp.Update
哪位高手有修改标准件数据的方法吗?联系MSN: hellilu@gmail.com,,谢谢 |