5 Replies Latest reply on Nov 6, 2012 4:42 AM by Artem Taturevych

    API 2012 installation

    Timo Siltala

      I downloaded and installed API into Win 7 machine by running the apisdk.exe which installs some wizards and templates.  What I am missing are all help and manual files like apihelp.chm and others which were installed into a folder with previous API:s. How can I get these?

       

      Timo

        • Re: API 2012 installation
          Artem Taturevych

          If 'm not mistaken SDK contains templates only and Help Documentation is not included. You can find Help Documentation and redist-files at:

           

          <SolidWorks Installation Path>\SolidWorks Corp\SolidWorks\api

           

          or over the web:

           

          http://help.solidworks.com/2012/English/api/sldworksapiprogguide/Welcome.htm

           

          ______________________

          Regards,

          Artem Taturevych

          Application Engineer at Intercad

          http://intercad.com.au/

          Tel: +61 2 9454 4444

            • Re: API 2012 installation
              Timo Siltala

              Dear Artem,

               

              I upgraded to VS2010, SP1 (Ultimate), created a solution using wizard for "SW COM Non-Attributed Add-in" (what does this Non-Attributed mean?) with all but drawing documents chosen, changed it to 64 bit (because my system is Win7_64) and tried to build it both for debug and release. Yes, I copied the .tlb files to the project folder, for some reason VS didn't find them at all and adding their path to "Include Directories" didn't make them available.

               

              So, both debug and release attempts end with warnings and error messages:

              1>SwDocument.cpp(18): error C3861: 'assert': identifier not found

              1>SwDocument.cpp(120): error C2143: syntax error : missing ';' before '->'

              1>SwDocument.cpp(120): error C2143: syntax error : missing ';' before '->'

              1>SwDocument.cpp(230): warning C4482: nonstandard extension used: enum 'SwConst::swComponentSuppressionState_e' used in qualified name

              1>SwDocument.cpp(250): warning C4482: nonstandard extension used: enum 'SwConst::swComponentSuppressionState_e' used in qualified name

              1>SwDocument.cpp(298): warning C4482: nonstandard extension used: enum 'SwConst::swComponentSuppressionState_e' used in qualified name

              1>SwDocument.cpp(314): warning C4482: nonstandard extension used: enum 'SwConst::swComponentSuppressionState_e' used in qualified name

               

              So, is there a problem with my installation or is this a bug in the wizard?

               

              Best regards,

               

              Timo

                • Re: API 2012 installation
                  Artem Taturevych

                  Hello Timo,

                   

                  The errors you are pointing do not look like you have a problems with tlbs. Just for sure specify the full paths to tlbs in your stdafx.h.

                   

                  What lines of code these errors are pointing to?

                   

                  It seems the first error is unrecognized 'assert' define. Seems to be missed include. Just comment this line.

                   

                  If I'm not mistaken it should look like this:

                   

                  CSwDocument::~CSwDocument()

                  {

                                 assert(openModelViews.size() == 0);

                   

                                 return;

                  }

                   

                  In order to resolve warnings just remove the enum name:

                   

                  from swComponentSuppressionState_e.swComponentFullyResolved to swComponentFullyResolved

                   

                  What other lines are failing?

                   

                  I have VS 2008 and cannot check it with VS 2010. From VS 2008 it is working fine.

                  ______________________

                  Regards,

                  Artem Taturevych

                  Application Engineer at Intercad

                  http://intercad.com.au/

                  Tel: +61 2 9454 4444