Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

SolidWorks-Mathcad integration Install & User Guide

The SolidWorks-Mathcad integration allows users to link SolidWorks dimensions with Mathcad calculations, enabling design optimization. It utilizes a VB.NET DLL to facilitate communication between the two software through XML strings. Users can perform analyses and optimizations in Mathcad based on SolidWorks models and vice versa by tagging variables appropriately.

Uploaded by

yeciwo5599
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

SolidWorks-Mathcad integration Install & User Guide

The SolidWorks-Mathcad integration allows users to link SolidWorks dimensions with Mathcad calculations, enabling design optimization. It utilizes a VB.NET DLL to facilitate communication between the two software through XML strings. Users can perform analyses and optimizations in Mathcad based on SolidWorks models and vice versa by tagging variables appropriately.

Uploaded by

yeciwo5599
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

SolidWorks – Mathcad 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.

Use Case Scenarios


1.) An engineer has design a model in SolidWorks and wishes to do a quick analysis
to see if this design will buckle under a certain pressure. Mathcad is not an FEA
tool like Cosmos, but given height, width and length, Mathcad can do a
scratchpad analysis to allow the designer to quickly understand if he has derailed
his design.

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.

a. Open a command window.


b. Change the directory to your Microsoft.Net Framework version directory,:
C:\windows\microsoft.net\framework\v1.1.4322

c. At the command prompt, type the following command:

regasm C:\mathcad\mathcad_14.dll /codebase

where c:\mathcad\mathcad_14.dll represents the directory where your


mathcad_14.dll file is located.

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.

Now your worksheet is prepped and the integration is ready to go.

How to use the integration


To use the SolidWorks-Mathcad integration, load the SolidWorks model discussed earlier
into SolidWorks. Under the Mathcad_14 toolbar menu select Mathcad and then launch
the Mathcad Properties Panel
Use the drop downs on the left to map values to the selected values in the drop down on
the right.

Use the 2 submit buttons to transfer from SolidWorks to Mathcad or vice-versa.


With the example Mathcad worksheet and SolidWorks CAD part provided try the
following mapping

Map : SolidWorks Mathcad


D5@sketch1 w
D1@sketch1 d.b
D2@sketch1 d.r
D1@sketch4 z

Map : Mathcad SolidWorks


new_db D1@sketch1
new_dr D2@sketch1
new_z D1@sketch4

You might also like