Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

use of ListRecordInformation in a a macro?

To all,

 

The question relates to the use of the ListRecordInformation() keyword to extract the information of a record (i.e. a curve) saved in a .afu file and is linked to my limited knowledge of visual basic

 

I managed to extract the array of indexes in the .afu desired, see my example code, but I do not understand how to use the input mode

 

Any help woudl be appreciated

 

Thanks

 

Regards

 

JXB

Public Sub ListRecordInformation ( _
	afuFileName As String, _
	recordIndex As Integer, _
	listPointData As Boolean, _
	outputFileName As String, _
	mode As AfuManager..::..WritingFileMode _
)

 

Dim arrFullRecords() as integer
	
arrFullRecords=theSession.AfuManager.GetRecordIndexes(strPathSimAFU)
	
for i= 0 to UBound(arrFullRecords)
  theLW.WriteLine ("--" & arrFullRecords(i))
  theSession.AfuManager.ListRecordInformation(strPathSimAFU,i,false,"test.txt","Override")
next i

 

 

 

Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)
2 REPLIES

Re: use of ListRecordInformation in a a macro?

Going through the documentation, it looks like there is a function to extract the afudata (of a record). As the examples are non-existent, could someone give me a "push" in the right direction? I would like to "extract" the XYdata of a specific afu record (a force time history for a CBEAM in my example) to be able to search for specifc data. Ideally I would like the XY data to be passed into an array. Lookign at the doc it seems that the following should do the trick

 

Public Function GetAfuData ( _
	afuFileName As String, _
	recordIndex As Integer, _
	<OutAttribute> ByRef afuData As AfuData) As String
Return Value: Time stamp string indicates the last time the AFU Data Record was edited 

 which I attempted as follows

 

Dim myafudata() As AfuData
theSession.AfuManager.GetAfuData(strPathSimAFU,2,myafudata)

 but (as expected/anticipated) didn't work(!)

 

Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)
Solution
Solution
Accepted by topic author selex_ct
‎08-26-2015 04:32 AM

Re: use of ListRecordInformation in a a macro?

was missing the "CAE."

 

Dim myAfuData As CAE.AfuData
Dim RecordID as Integer
theSession.AfuManager.GetAfuData(myAfuFile, RecordID, myAfuData)

 

 

 

 

Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)