API in Soildworks

Discussion in 'SolidWorks' started by sivampeta_dheeraj, Oct 10, 2006.

  1. Can anybody suggest the best way to get started in API of Solidworks?
    And may I add, from scratch.

    Thank You,

    S.Dheeraj
     
    sivampeta_dheeraj, Oct 10, 2006
    #1
  2. sivampeta_dheeraj

    That70sTick Guest

    I always recommend that one first learns VBA or VB6 (or C++) before
    attempting to do much with SolidWorks API. It will be a long slow
    struggle to learn SW API if you do not know the basics of one of these
    programming languages. I recommend start with VBA, as it is the
    language of macro programs. There are many books and websites that can
    help you learn.

    To make an add-in you need a full version of VB or C. I have a lesson
    for making addins in VB6 <http://www.esoxrepublic.com/devtools/>.
    Again, I recommend you understand VB before you attempt to do this.
     
    That70sTick, Oct 10, 2006
    #2
  3. sivampeta_dheeraj

    lcifers Guest

    Hi.

    I would recommend first becoming familiar with VBA. If you use
    Microsoft Excel, thats a great place to start. The Excel API is
    probably easier to learn than the SolidWorks API, and there are a host
    of good books out there to teach you VBA programming in Excel
    step-by-step.

    Once you have a handle on VBA, you might want to find a training course
    if your SolidWorks VAR has one. Where are you located?

    Other than that, find something you want to automate in SW and just get
    started. You'll run into many problems, and can resolve them through
    research and by asking questions here. The more you do it, the easier
    it will become.

    Mike Spens has a book out called "Automating SolidWorks 2006 using
    Macros". I've never read it, but it would probably be helpful.

    Good luck. I was in your shoes 5 years ago, and know how difficult it
    can be to know where to start.

    Regards,

    - Luther
     
    lcifers, Oct 10, 2006
    #3
  4. sivampeta_dheeraj

    Ed Guest

    I have this book and it is very helpful.

    There are also several examples in the Help files and on the SW Web
    site etc. These can be helpful.

    Hope this helps,

    Ed
     
    Ed, Oct 11, 2006
    #4
  5. Thank you all for your advise.As I understand from your mails it would
    be better if I get a working knowledge of any VBA or more specifically
    Excel VBA because it is comparatively easier, before I dip my hands
    into Solidworks API. I can understand the spirit behind the advise.

    However I do feel Autocad VBA would be more ideal if it comes to
    learning some VBA..

    And would C be of any help?

    Finally I would appreciate if you can post the addresses of some web
    sites which cover VBA basics (if those are of Autocad it would be that
    much more helpful)

    Thank you once again for replying to my query.

    S.Dheeraj
     
    sivampeta_dheeraj, Oct 11, 2006
    #5
  6. sivampeta_dheeraj

    That70sTick Guest

    Excel VBA is about the same as any other VBA.

    There are two aspects to consider:

    1. Visual Basic (VBA and VB6) as a pure programming language. Learn
    how VB works to accomplish simple programming tasks. Get a solid
    understanding of objects and object-oriented programming.

    2. VB interacting with other applications like Excel or SW. The macro
    editors in Excel and SW are basic VB editors with templates that
    provide some default connections to Excel or SW. Learn how VB is
    connecting to the applications and accesing the application's
    functions.

    You can use either SW or Excel's VB (macro) editor to learn basic VB,
    even if your initial programs do not interact with Excel or SW.
     
    That70sTick, Oct 11, 2006
    #6
  7. sivampeta_dheeraj

    lcifers Guest

    True, but the Excel object model is a bit more intuitive and very well
    documented. I think it's easier to develop your first project in Excel
    than SW. And I would recommend against starting in AutoCAD. I think the
    SW API is better documented then AutoCAD's.
    I agree. But for me it was easier to learn when I was trying to
    accomplish something rather that doing purely academic exercises.

    Cheers.

    - Luther
     
    lcifers, Oct 12, 2006
    #7
  8. Thanks once again

    I am proceeding in the direction you have suggested.For starters I am
    going to concentrate on learning VB till I am comfortable in it.It may
    take some time.This will I believe give solid grounding in objects and
    object oriented programming.

    After that I will go in for Solidworks API.

    Comment solicited

    S.Dheeraj
     
    sivampeta_dheeraj, Oct 13, 2006
    #8
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.