SolidWorks 2013 API changes

Version 1

    This article highlights some of the changes in programming against the API in SolidWorks 2013.

    It also appears in the SW2013 Beta forum (SolidWorks Forums > General > SolidWorks 2013 Beta > Blog : SolidWorks 2013 API changes).

     

     

    #1 Visual Basic for Applications (VBA) change

     

    SolidWorks 2013 ships with VBA 7.1 instead of VBA 6.
    This will introduce support for 64-bit, including a 64-bit integer type, a pointer type, and VBA code running within the 64-bit sldworks.exe process instead of in a separate 32-bit host process.
    VBA 7.1 is also included in MS Office 2010.

    A more elaborate overview what this change entails can be found in the attachment “SolidWorks 2013 and VBA 7 - v5.zip”.

     

     

     

     

    #2 .NET framework change

     

    SolidWorks 2013 has been developed using Visual Studio 2010 SP1 and targets the .NET 4.0 framework.

    Starting with .NET 4.0 a single process can run the CLR 2.0 and CLR 4.0 virtual machines concurrently, so you are not obliged to retarget add-ins containing managed code at this stage.

    The SolidWorks Primary Interop Assemblies (PIAs) for CLR 4.0 can be found in:

     

                    [SOLIDWORKS_INSTALL_FOLDER]\api\redist

     

    Visual Studio Tools for Applications (VSTA) remains limited to running only the CLR 2.0 virtual machine, so VB .NET and C# macros can only be targeted to the .NET 2.0/3.0/3.5

    frameworks.
    To this end you will find SolidWorks PIAs for CLR 2.0 in:

     

                    [SOLIDWORKS_INSTALL_FOLDER]\api\redist\CLR2

     

     

     

    #3  C++ Compiler change

     

    SolidWorks 2013 has been developed using Visual Studio 2010 SP1.

    For those applications using Microsoft Foundation Class (MFC) extension C++ add-ins or COM based C++ add-ins dynamically linked against MFC, a recompile using the VC++ 10 compiler is mandatory to ensure MFC state is correctly shared between SolidWorks and the add-in.

     

     

     

     

    As with every release and service pack, new API interfaces, methods, and properties can be found in the regular API documentation in the “Release Notes” topic of each help book. Some of these books can also be found on-line at http://help.solidworks.com/ (SW2010 – SW2012 available, SW2013 to follow after FCS).

     

     

    On behalf of the API Development, Support, and Documentation teams, happy SW2013 programming.
    Please let us know your feedback.

     

     

    Regards,

     

     

      Frank

     

    Copyright © 2012 Dassault Systèmes SolidWorks Corp. All rights reserved.
    Do not distribute or reproduce without the written consent of Dassault Systèmes SolidWorks Corp