Visual Basic 2005 Express

Discussion in 'SolidWorks' started by ahoneyfield, Jun 19, 2007.

  1. ahoneyfield

    ahoneyfield Guest

    Hi All,

    I'm transferring an old macro from SolidWorks macro editor to
    Microsoft Visual Basic 2005 Express, making use of the SwVBAddin you
    can download from Solidworks to create a DLL Add-in.

    The macro allows a user to save a copy of a part referred to in a
    drawing, using the following line:

    bRet = swDrawModel.SaveAs4(TASKWORKDIR & savename & ".sldprt",
    swSaveAsCurrentVersion, swSaveAsOptions_Copy, nErrors, nWarnings)

    Trouble is that the option 'swSaveAsOptions_Copy' doesn't work, so
    once run the drawing points to the newly saved part file, instead of
    the original. Strangely this option seems to work in VB6 provided
    with SolidWorks.

    Anybody have any ideas?
     
    ahoneyfield, Jun 19, 2007
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.