cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the selcted mesh info

Pioneer
Pioneer

Hi Team,

 

I have created a GUI which selects the mesh using select object. Once the mesh is selected I need to extract the elements associated with the selected mesh only. I am able to select the all the available mesh but not the selected one.

 

Can anyone help me to do so.

 

thaks in advance

2 REPLIES

Re: How to get the selcted mesh info

Siemens Phenom Siemens Phenom
Siemens Phenom

Use NXOpen.CAE.SmartSelectionManager.CreateRelatedElemMethod().GetElements() to get the elements associated to a mesh.

Re: How to get the selcted mesh info

Phenom
Phenom
theLW.WriteLine("Mesh Collectors:")
For Each theMeshCollector As CAE.MeshCollector In thefemPart.BaseFEModel.MeshManager.GetMeshCollectors'
	theLW.WriteLine("")
	theLW.WriteLine("  name: " & theMeshCollector.Name)
	theLW.WriteLine("  Collector Neutral Type: " & theMeshCollector.CollectorNeutralType)	
	theLW.WriteLine("  type: " & theMeshCollector.CollectorType)
	theLW.WriteLine("  contains meshes:")

	For Each theMesh As CAE.Mesh In theMeshCollector.GetMeshes	
		theLW.WriteLine("    name: " & theMesh.Name)
		theLW.WriteLine("    type: " & theMesh.GetType.ToString)				
		theLW.WriteLine("    descriptor name: " & theMesh.ElementPropertyTable.DescriptorSpecificName)
		theLW.WriteLine("    property count: " & theMesh.ElementPropertyTable.GetPropertyCount.ToString)
		theLW.WriteLine("")
   Next
Next
Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)