Error in SetPartData - AutoCAD Mechanical VBA
I have the following code which is a part of code to insert a part reference, balloon and partlust.
Dim oBOMMgr As McadBOMMgr
Set oBOMMgr = oSymBB.BOMMgr
Call oBOMMgr.SetPartData(oPartRef, partData)
It runs perfectly in AutoCAD Mechanical 2011.
But I get an error ('unspecified error') when I run the same code in AutoCAD Mechanical 2010.
Does anybody know how to overcome this error?
Re: Error in SetPartData - AutoCAD Mechanical VBA
A VBA dvb file is like a dll. It has compiled code in it. If you compiled a dvb for 2011, you can't run the same dvb in 2010. To use it in 2010, open the project in 2011 and export everything. Then open 2010 and import the files you created. Save the 2010 dvb to a different location so that they don't get confused. If you open a dvb created in 2010 inside 2011, it will automatically get compiled for 2011 and you won't be able to use it in 2010 again.
Also, when you open a 2010 project in 2011, vba automatically binds to the 2011 type library (See Tools>References).