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

AFU record: GetComplexData ?

To all


I am trying to retrieve the Y data from a complex (afu) record; that is a record with Real and imaginary as Y values.

I am using the code below to extract the values but I only get hte Real part in the array theYvalues?


Dim theXvalues(),theYvalues() As Double
myAfuData.GetComplexData(theXvalues, theYvalues)


how do I get the imaginary part too? I ultimately need to calculate the magnitude




Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)
Accepted by topic author selex_ct
‎09-15-2016 11:04 AM

Re: AFU record: GetComplexData ?

Dim theXvalues(),theYvalues(), imaginary() As Double
imaginary = myAfuData.GetComplexData(theXvalues, theYvalues)

Re: AFU record: GetComplexData ?

Dhoo. So obvious now that you showed me!

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

Re: AFU record: GetComplexData ?

Unfortunately, the signature of this function is a bit convoluted. The imaginary/phase values are returned by the function, so you really need to call it like:


Dim theXvalues(),theRealMagValues(),theImagPhaseValues() As Double
theImagPhaseValues = myAfuData.GetComplexData(theXvalues, theRealMagValues)



Public Function GetComplexData(ByRef xValues() As Double, ByRef yValues() As Double) As Double()
     Member of NXOpen.CAE.AfuData
Get the XY data of an AFU Data Record when the ordinate type is Complex

xValues: Abscissa element data values
yValues: Ordinate element data values for real part or magnitude part

Return Values:
Ordinate element data values for imaginary part or phase part

Created in NX4.0.0
License requirements: nx_ftk ("NX Advanced Graphing")