API VBA: Calling on SW from Excel

Discussion in 'SolidWorks' started by Corey Scheich, Oct 9, 2003.

  1. Is it possible to call solidworks from excel. I just want to batch print
    but the thing is the lists I get may either be in solidworks or autocad.
    Printing the AutoCad ones works just fine but I have been having trouble
    attaching to SW.

    Corey Scheich
     
    Corey Scheich, Oct 9, 2003
    #1
  2. Yes it can. I use it for custom properties.

    Therfor I use this in excell to connect to solidworks

    ' Connect to solidworks and active model
    Set swApp = CreateObject("SldWorks.Application")
    swApp.Visible = True
    swApp.UserControl = True

    Johnny
     
    Johnny Geling, Oct 9, 2003
    #2
  3. Also make sure your macro references the SolidWorks type library:
    sldworks.tlb
    I don't think you need to set usercontrol to true unless you are creating an
    interactive type of program.

    --Brenda
     
    Brenda D. Bosley, Oct 9, 2003
    #3
  4. Thanks, I finally got a chance to try it and Now it works. I appreciate it.

    Corey
     
    Corey Scheich, Oct 20, 2003
    #4
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.