cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the physical property table from selected mesh...

Pioneer
Pioneer

Hi Team,

 

How can I get the phycical property table associated with the selected mesh.

 

I need to find the associated physical property table to get the material properties.

 

NXOpen.CAE.Mesh tmpMesh = (NXOpen.CAE.Mesh)NXOpen.Utilities.NXObjectManager.Get(tempT);

string tmpString = tmpMesh.Name;

selectedmesh = tmpString;

NXOpen.CAE.IMeshCollector theMeshCollector123 = tmpMesh.MeshCollector;

3 REPLIES

Re: How to get the physical property table from selected mesh...

Siemens Phenom Siemens Phenom
Siemens Phenom

The physical prop table is assigned to the collector, not the individual mesh

 

Get the MeshCollector for the Mesh

Get the ElementPropertyTable from the MeshCollector (physPropTable in the code below)

Get the material table from the ElementPropertyTable

 

Dim materialTable As PhysicalMaterial = physPropTable.PropertyTable.GetPhysicalMaterialPropertyValue("material").Material

Re: How to get the physical property table from selected mesh...

Pioneer
Pioneer

Hi Jim,

 

Thanks for the reply,

 

I trying to get the physical material in the same way what you told in NX-11, but it throwing an error showing property with this name could not be found.

 

NXOpen.CAE.PropertyTable x133 = theMeshCollector123.ElementPropertyTable;

NXOpen.PhysicalMaterial yy = x133.GetPhysicalMaterialPropertyValue("material").Material;

Re: How to get the physical property table from selected mesh...

Siemens Phenom Siemens Phenom
Siemens Phenom

Did you query all of the properties in the x133 PropertyTable?

 

    Sub listPropTable(ByVal propTable As CAE.PropertyTable)

        For i As Integer = 0 To propTable.GetPropertyCount - 1

            Dim propName As String = propTable.GetPropertyNameByIndex(i)
            Dim propType As CAE.PropertyTable.PropertyType = propTable.GetPropertyType(propName)

            theLw.WriteLine("PropName: " + propName + "  Type: " + propType.ToString)

        Next i

    End Sub