Apr 5, 2012

SolidWorks API Tools

,
An API, or application programming interface, is a software interface that allows applications to communicate with one another. Creating APIs encompasses numerous programming tools that help build routines and protocols. The SolidWorks Corporation offers a collection of 3-D software
tools – including SolidWorks CAD, SolidWorks Simulation and SolidWorks Sustainability – for creating, managing and publishing data. The software developers at SolidWorks recommend a slate of programming tools for developing API applications compatible with the company's software.



SolidWorks Macros

  • According to SolidWorks, recording a SolidWorks macro serves as the most accessible way to start programming with the SolidWorks API. SolidWorks' programs contain both Microsoft Visual Basic for Applications and Visual Studio Tools for Applications embedded in the software. The former allows users to record and edit macros, saved as SWP format files, in SolidWorks software while the latter does the same for VB.NET and C# code in the software, though it creates DLL rather than SWP files.

Creating an API Application with Macros

  • To create a SolidWorks API with SolidWorks macros, the company recommends thoroughly planning the user interface actions and then recording those actions. SolidWorks then suggests moving on to editing the macro, removing extra lines of code and declaring and binding variables. Running the macro and debugging it help test for stability. Once tested, Microsoft VBA and Microsoft VSTA lend themselves to building user interfaces for the application. Stand-alone SolidWorks API applications take the form of EXE files, while add-in applications are DLL files.

    Programming Languages

    • Any programming language that supports Microsoft's architecture for compatible Windows applications, the Component Object Model, or COM, accommodates the creation of both stand-alone and add-in SolidWorks API applications. These programming languages include Visual C# .NET, Visual C++ 6.0, Visual Basic C++ and Visual Basic .NET.

    Microsoft VBA-Enabled Applications

    • Having Microsoft VBA embedded in the software means that SolidWorks software is VBA-enabled. VBA-enabled software interacts with other applications that are also VBA-enabled, so that programmers can use VBA to create a SolidWorks application that attaches to active objects in other programs. Examples of other VBA-enabled programs include Microsoft Access, Microsoft Excel and Microsoft Visio. When VBA applications attach to running instances in other VBA-enabled programs, they can retrieve data which can in turn be used with SolidWorks software.
 

HowToYo Copyright © 2011 | Template design by O Pregador | Powered by Blogger Templates