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