cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Unit issue: assigning material

Mat
13-Aquamarine
13-Aquamarine

Unit issue: assigning material

Hi there,

when I try to assign a material to a part using a *.mtl - file, the units in the mtl-file are ignored.

For instance

Young Modul:

"2300 MPa" becomes "2300 lbm/(in sec^2)" when I assign it via script (CurModel.CurrentMaterial = CurModel.RetrieveMaterial(material_name);)

"2300 MPa" becomes "41.0733 kPa " when I assign it via User Dialogue

I am using Creo 3.0 M050.


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
ACCEPTED SOLUTION

Accepted Solutions
Mat
13-Aquamarine
13-Aquamarine
(To:Mat)

I found a work around.

I change units after retrieving the material.

CurModel.CurrentMaterial = CurModel.RetrieveMaterial(material_name);

CurModel.CurrentMaterial.SetPropertyUnits(pfcCreate("pfcMaterialPropertyType").MTL_PROP_MASS_DENSITY, "kg/mm^3", false);

CurModel.CurrentMaterial.SetPropertyUnits(pfcCreate("pfcMaterialPropertyType").MTL_PROP_YOUNG_MODULUS, "MPa", false);

CurModel.CurrentMaterial.SetPropertyUnits(pfcCreate("pfcMaterialPropertyType").MTL_PROP_THERMAL_EXPANSION_COEFFICIENT, "/ K", false);

CurModel.CurrentMaterial.SetPropertyUnits(pfcCreate("pfcMaterialPropertyType").MTL_PROP_SPECIFIC_HEAT, "joule / (kg K)", false);

CurModel.CurrentMaterial.SetPropertyUnits(pfcCreate("pfcMaterialPropertyType").MTL_PROP_THERMAL_CONDUCTIVITY , "W/(m K)", false);

The downside is, that all mtl-files have to be converted to those units.

View solution in original post

1 REPLY 1
Mat
13-Aquamarine
13-Aquamarine
(To:Mat)

I found a work around.

I change units after retrieving the material.

CurModel.CurrentMaterial = CurModel.RetrieveMaterial(material_name);

CurModel.CurrentMaterial.SetPropertyUnits(pfcCreate("pfcMaterialPropertyType").MTL_PROP_MASS_DENSITY, "kg/mm^3", false);

CurModel.CurrentMaterial.SetPropertyUnits(pfcCreate("pfcMaterialPropertyType").MTL_PROP_YOUNG_MODULUS, "MPa", false);

CurModel.CurrentMaterial.SetPropertyUnits(pfcCreate("pfcMaterialPropertyType").MTL_PROP_THERMAL_EXPANSION_COEFFICIENT, "/ K", false);

CurModel.CurrentMaterial.SetPropertyUnits(pfcCreate("pfcMaterialPropertyType").MTL_PROP_SPECIFIC_HEAT, "joule / (kg K)", false);

CurModel.CurrentMaterial.SetPropertyUnits(pfcCreate("pfcMaterialPropertyType").MTL_PROP_THERMAL_CONDUCTIVITY , "W/(m K)", false);

The downside is, that all mtl-files have to be converted to those units.

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags