Cancel
Showing results for 
Search instead for 
Did you mean: 

NXopen_Get all collectors

How to get list of all collectors in fem file with NXopen methods?

3 REPLIES

Re: NXopen_Get all collectors

Siemens Phenom Siemens Phenom
Siemens Phenom

 Alexander,

 

You get these from the FEModel. VB Code:

 

Dim myFemPart As CAE.FemPart = theSession.Parts.BaseWork
Dim myMeshCollectors As New List(Of CAE.MeshCollector)(myFemPart.BaseFEModel.MeshManager.GetMeshCollectors)

 

Regards,

Jim

 

Re: NXopen_Get all collectors

Thank you . I will try this.

Re: NXopen_Get all collectors

Hi Jim. 

I havn't work with list objects much and meet with error with your code in list initialization.

But if use an array , than it works fine :

 

Dim myFemPart As CAE.FemPart = theSession.Parts.BaseWork
'Dim myMeshCollectors As New List(Of CAE.MeshCollector)(myFemPart.BaseFEModel.MeshManager.GetMeshCollectors)
Dim myMeshCollectors() As CAE.IMeshCollector = myFemPart.BaseFEModel.MeshManager.GetMeshCollectors
theLW.WriteLine("There were found :" & System.Convert.ToString(myMeshCollectors.Length) & "collectors in file")

For i As Integer = 0 To UBound(myMeshCollectors) Step 1
theLW.WriteLine("Collector # :" & System.Convert.ToString(i + 1) & " has name : " & System.Convert.ToString(myMeshCollectors(i).Name))
theLW.WriteLine("Collector # :" & System.Convert.ToString(i + 1) & " has type : " & System.Convert.ToString(myMeshCollectors(i).CollectorType))
Next i