Results 1 to 2 of 2

Thread: Error in SetPartData - AutoCAD Mechanical VBA

  1. #1
    Login to Give a bone
    0

    Default 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?
    Last edited by Nirantar.Vidyarthee904215; 2013-05-03 at 04:13 AM.

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,419
    Login to Give a bone
    0

    Default 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).
    C:> ED WORKING....


    LinkedIn

Similar Threads

  1. AutoCAD Mechanical 2005 very bottom bar Error
    By ningami in forum AutoCAD General
    Replies: 3
    Last Post: 2010-06-04, 03:48 PM
  2. Replies: 3
    Last Post: 2009-10-14, 12:15 AM
  3. Error 1328: Service Pack 1 will not install AutoCAD Mechanical 2007
    By svanderputten in forum AutoCAD Mechanical - General
    Replies: 5
    Last Post: 2007-01-11, 10:16 PM
  4. Autocad Mechanical 2000i / Win 98 Error
    By mbell.peerless in forum AutoCAD Mechanical - General
    Replies: 1
    Last Post: 2006-07-09, 09:59 AM
  5. Mechanical Desktop&Autocad Mechanical
    By danang_061 in forum MDT - General
    Replies: 1
    Last Post: 2004-10-29, 05:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •