3 Replies Latest reply on Aug 28, 2018 12:06 AM by Keith Rice

    New to API !

    Muhammad Tariq

      Hello Dears,

       

      I am very new to the APIs and programming at all.

      so, I am very confused where to start.

      please if you've any recommendations !

       

      Also, I've viewed the SW help for APIs and the help files contains a lot of codes that really followed by (ISldWORKS) and every time i am trying to imitate the code in the Visual Basic (Usage ) and (Declaration) actually it gives me errors.

      I know that this codes actually not a codes to be pasted but i can't figure it out how to make use of those codes if they are not to be used !
      also, when I'm trying to click on the VBA Syntax it gives me codes that i can't actually understand ! I've searched a lot how to use these codes actually inside the SolidWorks programming interface and unfortunately i didn't find an obvious answer.

       

       

      I know that my questions might be silly for some of you but consider that i am actually hasn't any programming experience nor knowledge. I am just understands the concepts and have some experience in DriveWorks Solo and many other software like it.

       

      Thanks in advance and really appreciate your help.

        • Re: New to API !
          David Brukardt

          When VB.net, C# and C++ were not part of the API, the help was much better.  There are several websites that offer VBA/SW API programming classes.  You can also search API help typing "example (vba)".

           

          However, it does not help if you have no program experience.  If you are going to use VBA, I recommend finding a good programming reference for VB6.0.  Also try recording a few macros (although that does not always record items selected from the menu or property manager, and does not use the more efficient ways of declaring SolidWorks object variables).

           

          I am self taught in programming both VB6.0, VBA and SW API so...

          • Re: New to API !
            Artem Taturevych

            You can look at Code Stack for collection of tutorials (SW API and VBA in general), also look at cadsharp for some video tutorials (requires membership).