5 Replies Latest reply on Jul 22, 2013 12:42 AM by Artem Taturevych

    Reading BOM, code no longer works getting cast exception in 2013 64 bit SP 3.0

    Susan Irby

      I assumed mainteance of an old app that I'm testing and running against 2013 64 bit SolidWorks Service Pack 3.0

       

              swApp = CreateObject("SldWorks.Application")

       

              swModel = swApp.ActiveDoc

              swDraw = swModel << here System.InvalidCastException

              swView = swDraw.GetFirstView

              swTable = swView.GetFirstTableAnnotation

            

            Do While Not swTable Is Nothing

                  ProcessTable(swApp, swModel, swTable)

                  swTable = swTable.GetNext

       

      Looking at what is produced from .tlb I can see that those two objects aren't compatible.  Since I'm new to SolidWorks is this something that has changed.

       

      Is there something new I can do to fix this?

       

      I've looked through code examples in the API help and the swDraw = swModel appears a lot.