SolidWorks-Mathcad integration Install & User Guide
SolidWorks-Mathcad integration Install & User Guide
Introduction
This integration provides users with an opportunity to combine both products, allowing
SolidWorks dimensions to drive Mathcad calculations. The results of those calculations
can then be sent back to SolidWorks to optimize the design.
This utility is a non-supported example of how Mathcad and SolidWorks can be used in
conjunction, based upon each product’s supported API.
Description
The integration is offered as a VB.NET DLL which implements the SolidWorks AddIn
Class. This DLL uses both the SolidWorks API and the Mathcad API to pass XML
strings between the 2 products.
In this case the designer can send height, width and length dimensions to a pre-
built Mathcad worksheet. This worksheet will use the parameters to calculate the
allowable pressure and then perform a simple comparison to see if this allowable
pressure meets design criteria.
2.) This same designer would like to minimize the size of his/her model while staying
within the limits of buckling. The earlier Mathcad worksheet can be extended to
include constraint based optimization. The results of this optimization would be a
new height, width and length. These new dimension values can be sent back to
SolidWorks to update the model.
3.) Many ad-hoc calculations are done throughout the course of a design. Mathcad is
the ultimate tool for documenting those calculations and even tying the results of
those calculations to the model in SolidWorks. This documentation can be
submitted with the SolidWorks model to whatever Document Management/PLM
system the user has installed.
How to install
1.) Register the Mathcad DLL using the regasm utility.
2.) Attach the Add-In to the SolidWorks Interface through the Tools menu.
d. Using the SolidWorks Tools Add-Ins menu, check the box to select
Mathcad_14.
e. Select “OK”.
3.) Verify that the Mathcad_14 menu item has been added to the SolidWorks menu
bar.
How to prepare your Mathcad worksheet for use in the integration
The first step is to decide what model in SolidWorks you want to tie to Mathcad
calculations.
Once this is done, you need to think about what calculations you want to drive the model
you have in mind. Many pre-built calculations exist in Mathcad Libraries and Extension
Packs. Of course Mathcad allows you to build your own equations in natural math
notation with units on the terms or systems of linear and non-linear equations, or
optimization calculation and more.
OK, assume now we have our CAD model and we have our calculations in Mathcad.
Looking at the Mathcad worksheet, decide which variables you want to have driven by
the SolidWorks model. Also decide which Mathcad variables you want to send to
SolidWorks to modify the CAD model.
The variables you want to have driven by SolidWorks need to be tagged as”SW2MC”.
To do this simply right mouse click on the region, select properties. In the TAG text box
type (in capitols) SW2MC.
The variables you want to send to SolidWorks from Mathcad need to be tagged
as”MC2SW”. To do this simply right mouse click on the region, select properties. In the
TAG text box type (in capitols) MC2SW.