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

syntax to use RSEvent.GetResultFileName()?

to all

 

I am trying to use the option RSEvent.GetResultFileName() to return the .afu file associated with the event but failing miserably.

 

Could someone poinyt me in the right direction?

 

Thanks

Regards

 

Dim RespSimSolFound As CAE.ResponseSimulation.Solution
	
	For Each myRespSimCol As CAE.ResponseSimulation.Solution In theRespSimManager.Solutions
		theLW.WriteLine("Resp Sim Name is:" & myRespSimCol.GetSolutionName)

		For Each myRSEvent As CAE.ResponseSimulation.RSEvent In RespSimSolFound.GetEvents		
			theLW.WriteLine("  Event Name is:" & myRSEvent.GetEventName)
			Dim thefileType As CAE.ResponseSimulation.RSEvent.ResultFileType = CAE.ResponseSimulation.RSEvent.ResultFileType.FunctionResponse
			Dim sTheAFUFilePath As String = IntheRSEvent.GetResultFileName(thefileType)
			theLW.WriteLine("  AFU File is:" & sTheAFUFilePath)
		Next
	Next	
Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)
2 REPLIES
Solution
Solution
Accepted by topic author selex_ct
‎01-05-2017 03:20 AM

Re: syntax to use RSEvent.GetResultFileName()?

[ Edited ]

Assuming that there are no copy/paste errors in your example, where did "IntheRSEvent" come from? The RSEvent objects you're looping over are named myRSEvent.

 

Change this:

Dim sTheAFUFilePath As String = IntheRSEvent.GetResultFileName(thefileType)

 

 to this:

Dim sTheAFUFilePath As String = myRSEvent.GetResultFileName(thefileType)

 

Re: syntax to use RSEvent.GetResultFileName()?

that's me not paying attention (at all!). Rather embarrassing. Thanks a lot

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