产品导航
新闻分类
公司信息
联系我们
联系人:郭东江工程师
电话:0379-69980172
手机:13903792361
aaaaaa15920989080
传真:0379-63335421
地址:洛阳市洛龙区牡丹宫路安业工业园内中区第四排房屋东部(娇娇超市南200米)
新闻详情
Mathcad 与 SolidWorks 集成的演示与安装方法
工程计算软件Mathcad与SolidWorks一起使用时,利用双向集成功能,可以自动在 SolidWorks 模型及 Mathcad 之间来回发送尺寸,优化设计。 在此网络短片中,PTC工程师主要为您演示: • 模型中的参数发送到Mathcad工作表,进行几何体分析 • Mathcad工作表计算值驱动SolidWorks模型,几何体自动更新 • Mathcad 计算产生的几何值(eg. 曲线,曲面)发送到 SolidWorks,创建几何 <观看演示短片>,直观了解Mathcad与SolidWorks的集成! [小贴士] 如果您是第一次接触Mathcad,可以先观看<5分钟Mathcad动画短片>,获得初步了解。 [关于Mathcad] Mathcad是一种工程计算软件,它为您提供独特、非常清晰的白板界面,让您轻松地执行、记载和共享工程计算及设计工作。Mathcad 是一个直观的工具,使您能够保护重要的知识资产,同时简化守规、报告、验证和故障排除工作。 http://www.ptc.com/appserver/wcm ... 0&icg_dbkey=482 |
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.
It was built and tested on Windows XP-32, using Solidworks 2008 and Mathcad 14.
(我在SolidWorks 2009下测试没有成功。dos下提示:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>regasm D:\Program Files\Mathcad 14 \mathcad_14.dll /codebase Microsoft(R) .NET Framework 程序集注册实用工具 2.0.50727.1433 版权所有(C) Microsoft Corporation 1998-2004。保留所有权利。 RegAsm : error RA0000 : 无法定位输入程序集“D:\Program”或它的一个依赖项。
Description
The integration is offered as a VB.NET DLL which implements the Solidworks Add-In Class. This DLL uses both the Solidworks API and the Mathcad API to pass XML strings between the two products.
Use Case Scenarios
1.) An engineer has to 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.
4.) Some design engineers wish to use math equations to generate geometries. These calculations can easily be performed in Mathcad and the output data can be sent to Solidworks.
Installation
1.) Register the Mathcad DLL using the regasm utility.
- Open a command window.
- Change the directory to your Microsoft.Net Framework version directory:
C:\winnt\microsoft.net\framework\v1.1.4322
- At the command prompt, type the following command:
regasm C:\mathcad\mathcad_14.dll /codebase
where c:\mathcad represents the directory where your mathcad_14.dll file is located.
2.) Attach the Add-In to the Solidworks Interface through the Tools menu.
- Using the Solidworks Tools à Add-Ins menu, check the box to select Mathcad_14.
- Select “OK”.
3.) Verify that the Mathcad_14 menu item has been added to the Solidworks menu
bar.
Scalar Values
Preparing Your Mathcad Scalar Values for Use in the Integration
The first step is to decide what model in Solidworks you want to associate with 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 the Mathcad Libraries and Extension Packs. Of course Mathcad allows you to build your own equations in natural math notation with units on the terms, solve systems of linear and non-linear equations,
perform optimization calculations 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 Mathcad 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 dimensions 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.
Note: The tags must be set before loading the Mathcad worksheet into the integration.
Using the Integration with Scalar Values
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 ‘Load Mathcad Worksheet’ button to launch Mathcad and load the appropriate worksheet. Use the drop downs on the left to map values to the selected values in the drop down on the right.
Use the two ‘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
Curves and Matrices
Preparing Your Mathcad Curve and Surface Data for Use in the Integration
The curves and matrices 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 and in the TAG text box type (in capitols) MC2SW.
Curves and Matrices need to be formatted into arrays of triplets.
Curves
Curves are simply 3 column matrices, where each row represents an xyz triplet. The included worksheet, “matrix.xmcd”, shows an example called sindata. You can see how we use the Mathcad built-in function, augment, to create the sindata 3 column matrix.
Curve data that has been tagged with the TAG MC2SW will populate the “curves” drop down at the bottom of the Mathcad Panel.
Matrices
Matrices also need to be tagged as MC2SW. Their formatting is a bit tricky. Each of the three columns must represent a curve. You may have many columns depending on the number of vertical lines in your surface. Each row must also contain xyz triplets representing the horizontal lines in the surface.
You’ll notice that we use an inline function called build_array to map the surface data into spline triplets in the “matrix.xmcd” example included.
Using the Integration with Curve and Surface Data
Select the curve or matrix you wish to create in Solidworks from the drop downs called Curves and Matrices. After selecting a data set, click the Send button.
When initially trying the integration with curves and matrices, within Solidworks create a new part “3D representation of a single design component”. Also use the zoom to fit or zoom to area in Solidworks (under View-