几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   SolidWorks二次开发 (http://www.dimcax.com/hust/forumdisplay.php?f=111)
-   -   【转帖】using material physical properties in equations (http://www.dimcax.com/hust/showthread.php?t=5860)

yang686526 2009-04-13 03:10 PM

【转帖】using material physical properties in equations
 
using material physical properties in equations
i am trying to find a way to reference the yield and tensile strength of the material in equations. in the "api help", i can only find material visual properties and cannot find physical properties.
density is the only physical property that can be obtained directly from the model. to obtain the yield strength and tensile strength you would have to get the name of the material and then get the physical properties out of the xml .sldmat file. see the api helpl for partdoc::getmaterialpropertyname2. i would seriously doubt that this is possible in an equation. are you talking about a solidworks equation, or using a vba macro or external .exe program to perform calculations based on physical properties?
-handleman, cswp (the new, easy test)
unfortunately, it is for a solidworks equation. we generally use equations to create global variables that we then use in the custom properties of a part or an assembly. then we link to these custom properties in the drawing with annotations.
for the physical properties, the need was to clearly indicate on the drawing the tensile and yield strength of the material in psi and mpa, thus eliminating the need to insert a block which contains this information for the appropriate material.
the other possibility is to reference a block in the drawing simply by choosing the material in the part. would this be possible??


所有的时间均为北京时间。 现在的时间是 09:56 AM.