Highlighted

API GetColumnMinMax issues

Creator
Creator

Hello all, 

I am attempting to export the maximum values from a set of output vectors using the Results object. 

 

    dVal = 0
    For k = 1 To feResults.NumberOfColumns
        feResults.GetColumnMinMax( k-1, 0, nMinID, nMaxID, dMinVal, dMaxVal )
        'feResults.GetColumn(k-1, IDen, dVal)
        App.feAppMessage(FCM_HIGHLIGHT, "@col = " + CStr(k-1) + " : " +CStr(dMaxVal))


'Check Abs(min) vs max, bigger value is saved as dVal
        If Abs(dMinVal) > dMaxVal Then
            dVal = Abs(dMinVal)
        Else
            dVal = dMaxVal
        End If

        pastep10( m , j - jj + k ) = ddVal
    Next

 

The results are very confusing, because 3 of the columns are filled with 0's, but the Results object reports values from the first column: 

 

DataTable.PNGDataTable Readout            MaxVal.PNGValues from Results Object

I'm at a total loss here, so any ideas for why the preceding dMaxVal is being retained would be very helpful. 


Best,
MH

1 REPLY 1

Re: API GetColumnMinMax issues

Siemens Phenom Siemens Phenom
Siemens Phenom

I suspect your Results Browser object columns do not contain 0.0s.. they are most likely empty.  If you do have empty columns when you send the object to the data table like you are showing in the picture, they will still show up as 0s just because it has to fill the data table with something. 

 

I believe if you check the return code of your GetColumnMinMax calls you will find that it is returning 0 (FE_FAIL) for the empty columns. In that case, when the call fails, it isn't zeroing the previous Min/Max values and you are reporting them because you didn't check the return code.  If you truly had columns with all zeros, it should return a return code of -1 (FE_OK) and Min/Max values of 0.0.