14 Replies Latest reply on Jun 29, 2010 8:43 AM by chris misztur

    Want to learn API

      i want to learn Sldwrks API.How can i start with ?
      Suggest some materials to learn pls
        • Want to learn API
          Jorn Bjarning
          "Automating SolidWorks 2006 Using Macros" by Mike Spenscan be recommended. Available at Amazone.com.
            • Want to learn API
              can u send me some pdfs regarding the same ?
              r can suggest me some websites ?
              actually i need the basics of API.
                • Want to learn API
                  Jorn Bjarning
                  "Automating SolidWorks 2006 Using Macros" is really agood place to start. I can of course not send you that book as pdf.That would violate the copy right of the author! Buy the book -it's well worth the money.

                  Another good way to get startet - take a SW API course at yourdealer.

                  There are several splendid web sites dealing with SW API. Some ofthem are:

                  http://www.lennyworks.com/solidworks/default.asp?ID=20
                  http://sw.fcsuper.com/index.php
                  http://www.markkulehtola.net/wb/pages/solidworks.php
                  http://www.nhcad.com/sw_macros/

                  Search for "SolidWorks API" or "SolidWorksmacro" on Google will give you tons of hits for moreressources.
                    • Want to learn API
                      AS Jorn said,

                      Contact your SW dealer and ask for the API book.
                      Its called
                      "SolidWorks Office Premium"
                      "API Fundamentals Training"
                      It includes a CD too and it has many code examples etc.

                      I would also recomend if you are not familiar with Visual Basic 6.0 to take a tutorial /crash course on that.
                      If you are looking to write addins (.dll) for SolidWorks you will have to learn VB.NET too.

                      Cheers,

                      --Stav.
                • Want to learn API
                  SolidAir
                  sasi,

                  There are many examples right in the SolidWorks API help that will get you started. There are also examples in the SolidWorks customer portal.

                  SA
                  • Want to learn API
                    Another good buy is the API tutorial from myigetit.com. $25 gets you hundreds of hours of SolidWorks tutorials including all aspects of SolidWorks. The API section alone is over 14 hours and goes from basics through adanced API programming. There are also tutorials on using photoworks, surfaces, molds, etc. Very much worth the $25.
                      • Want to learn API
                        Chris M.

                        Rob McCune wrote:

                         

                        Another good buy is the API tutorial from myigetit.com.

                        Another vote for myigetit.com. The API tutorial is very nice, it goes from the basics to advance. They also allow you to download all of the example code. What I love about myigetit.com is its self paced. The price is unbeatable.

                          • Want to learn API
                            SolidAir
                            Rob or Chris,

                            What are the advanced lessons like?

                            SA
                              • Want to learn API

                                SolidAir wrote:

                                 

                                Rob or Chris,



                                What are the advanced lessons like?



                                SA

                                It sounds like a good purchase, but i need to ask the same question with SA before asking the company to buy it for me

                                --Stav.

                                  • Want to learn API
                                    I can't say, I am still not done with all the standard ones. And to be honest, I paid for this out of my own wallet. It was worth it enough to me to pay for it myself.
                                      • Want to learn API
                                        Michael Campbell
                                        I had an interest and need to use API. I did it without SWtraining...sort of.

                                        The first thing you must have a good hold of is VB. You have tounderstand the syntax and the way it thinks. If you know VB, itmakes API programming less painful.

                                        Next I would get acquainted with a file called"sldworksapi.chm". In 2006 is is hidden deep. In 2007 itis a little more apparent. The location is: <Driveinstalled>:\Program Files\Solidworks\api If you can not find itthere do a search for it.

                                        Now you can begin to harness the power of API. Create a sample fileto work with. Then. the quickest way is to use the recordfeature(Tool->Macro->Record). Save the file. Do the thingsyou want the Macro to do. This will serve as a reference to therest of your project. Look at the code, watch it run.

                                        I like GUI (Graphic user interface) so I create an "UserForm" and attach procedures to it and the various buttons,text boxes, etc. Cut and paste from your "referencefile". take little pieces, check it, and keep moving forward.Also note, there is no "On load" procedures so I justmade a "Start" button to do those procedures.

                                        Other notes:

                                        I found my experience both fun and scary. I had some 500+configurations( Won't do that again), and needed to put materialproperties (physical, not just text). One set would be the samepart, but with 4 different materials. The end result was a Macrothat would populate the configurations, populate materialsavailable, then the user could add the four different materialsfrom a drop down box, and press one button, and it would change thematerials in about 10 sec, with enough flash screen to knock youout. It was cool.

                                        You can also find a lot of code online, and play Frankenstein andsplice your API monster alive. 

                                        I hope this helps and give hope.  

                                • Re: Want to learn API
                                  Mohammad Awad

                                  Hi, thanks for the advice, but I have visited the site and I found API tutorial for solidworks2007 where I am using Solidworks 2010 does this work?

                                   

                                    Thanks

                                   

                                  Ramzi

                                • Re: Want to learn API
                                  chris misztur

                                  Sasi, what is your programming knowledge.  angelsix.com has excellent API books.