Making changes in a BOM with API

Discussion in 'SolidWorks' started by Craig T, Oct 15, 2004.

  1. Craig T

    Craig T Guest

    Hi,

    I'm trying to work with an excel based BOM, but I can't get get the
    changes to in the BOM to stay and detach from the BOM.

    If I omitt the bom.detach statemate, the user is left with excel
    spreadsheet open, if I include it the changes are lost

    What am I missing ?

    My bit of code looks like this,

    Set View = Drawing.GetFirstView
    Set View = View.GetNextView
    Set BomTable = View.GetBomTable
    If Not (BomTable Is Nothing) Then
    BomTable.Attach3
    Set xl = GetObject(, "Excel.Application")
    Set xlsh = xl.ActiveSheet

    ' do excel stuff

    xl.Quit
    BomTable.Detach
    Set xl = Nothing
    Set BomTable = Nothing

    End If

    Cheers
    Craig
     
    Craig T, Oct 15, 2004
    #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.