June 12, 2005
June 12, 2005
June 15, 2005
10.322.1 - 10.322.13
Common API: Using Visual Basic to Communicate between Engineering Design and Analytical Software Tools
Prince, Stewart P., Ryan, Robert G., and Mincer, Tom
California State University, Northridge
Submitted for the 2005 ASEE Annual Conference
Abstract Mechanical Engineering students at California State University, Northridge currently use the SolidWorks suite of design and analysis tools to complement classroom learning. In particular, SolidWorks, CosmosWorks, CosmosMotion, and FloWorks, plus Microsoft Excel are used to solve different types of engineering problems. Communication between the different packages can be simplified and enhanced by the use of the Visual Basic Application Programmer Interface (API). Using the API, model files created in Solidworks can be manipulated directly inside of a control program such as Excel and the resulting altered parameters can be returned for further review. This paper describes how the API functions and how data can be transferred between the previously mentioned software tools. A machine design example is presented showing how a simply supported shaft can be designed in Excel, modeled in Solidworks, and analyzed in CosmosWorks for stress and deflection. The results, including stress, deflection, and mass properties are then returned to Excel for review.
Introduction The Mechanical Engineering Department at California State University, Northridge has been using the Microsoft Excel computing environment as its primary programming “language” for more than a decade. The familiar capabilities of the worksheet environment, coupled with the ability to perform complex calculations with Visual Basic for Applications (VBA), provide an effective platform for analyzing, designing, and optimizing engineering systems.
Since 2000, the Department has been using SolidWorks and the associated COSMOS analysis packages as the tool for designing and analyzing parts and assemblies. The continuing development of the Visual Basic language, and its ability to communicate with the SolidWorks “design suite” via the Applications Programmer Interface (API), has opened up new possibilities for creating an integrated computing environment for design and optimization.
The Visual Basic programming language is based on the BASIC (Beginners All-Purpose Symbolic Instruction Code) language, a language used by more programmers than any other in the history of computing. The “Visual” part of the name refers to the method
“Proceedings of the 2005 American Society for Engineering Education Annual Conference & Exposition Copyright © 2005, American Society for Engineering Education”
Prince, S., & Ryan, R. (2005, June), Common Api: Using Visual Basic To Communicate Between Engineering Design And Analysis Software Tools Paper presented at 2005 Annual Conference, Portland, Oregon. https://peer.asee.org/14336
ASEE holds the copyright on this document. It may be read by the public free of charge. Authors may archive their work on personal websites or in institutional repositories with the following citation: © 2005 American Society for Engineering Education. Other scholars may excerpt or quote from these materials with the same citation. When excerpting or quoting from Conference Proceedings, authors should, in addition to noting the ASEE copyright, list all the original authors and their institutions and name the host city of the conference. - Last updated April 1, 2015