AvisGrid control use

AvisGrid control use

11 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Richard,

It's odd that you are getting a crash on startup without the FileName property being set. The Array Viewer application uses the grid control and there's no file specified when the program starts. What version of CVF do you have? Try removing and re-inserting the control in the form and see if that has any effect.

You may not know that you can use aglGetShareName to get an identifier for an array in your program. You can then use the identifier as the filename. This avoids having to actually write to the disk. If you use aglAlloc (for C) or the Array_Visualizer attribute (Fortran) when allocating the array, the grid will reflect any changes in the data without having to copy the data.

Also, have you tried calling the Update method after CopyArrayData?

Since you are just getting started with Array Visualizer, you might want to take a look at the Intel Array Visualizer that is shipping with Intel Fortran v7 for Windows. It's a major update from the Compaq product with a new set of controls and calling conventions. You can find information about it at: http://www.intel.com/software/products/compilers/fwin/array_vis.htm. There won't be any more updates to the Compaq product.

John

John,
Thanks for the speedy reply.
I'm using CVF 6.6B. When this initially happened I un/reinstalled CVF (and ArrayVisualizer) - no change.
I've tried removing then reinserting the grid activeX - no change.
I don't want to use the agl code as I want to keep my code "standard" and easily redistributable - I want to use the ActiveXs simply.
I've finally gotten the grid to accept a safearray of data, and using the ROI methods I get it displaying the right dimensions and size.
Changing to Intel Fortran isn't an option, as I'm really only using fortran to run a couple of numerical methods, most of my code is C (MSVC) - which lets me mixed language programming within the MS Visual Studio. I thought since I have these handy activeX control, that I would use them to jazz up some apps... starting to have second thoughts though :-)

Regards
Richard

If you can post a simple sample, I'll take a look at it.

The AV2.0 product is independent of Intel Fortran. You should be able to install it and use it with MSVC as well as CVF, VB, etc.

John

John,
I thought I had sorted out my problems, but since trying to transfer my app to another PC I found that the Grid behaviour is different depending on the AGL file it is initially set up for. As I said before, I reload the Grid with an array, and call most of the methods to setup the row/col dimension, field width and precision, ROI,... which works great if "cardioid" (SAMPLEsDATA folder) is the original file, but not if "storm" (BIN folder) is ???

Here is my function that does most of the Grid setup
//-----------------------------------
void CAvisDisplay::FillGrid(int nRows,int nCols,VARIANT* pvar)
{
// _______ SETUP GRID ________________
m_AvisGrid.Reset();
m_AvisGrid.SetRowDim(0);
m_AvisGrid.SetColDim(1);

m_AvisGrid.SetFieldWidth(6);
m_AvisGrid.SetPrecision(2);

m_AvisGrid.SetDimName(0,(LPCTSTR)"Time");
m_AvisGrid.SetDimName(1,(LPCTSTR)"Board");
m_AvisGrid.SetShowDimLabels(true);

m_AvisGrid.SetShowCursor(true);
m_AvisGrid.SetCellEditEnabled(true);

m_AvisGrid.CopyArrayData(*pvar);
m_AvisGrid.SetROI(0,0,nRows);
m_AvisGrid.SetROI(1,0,nCols);
m_AvisGrid.Update();
}
//------------------------------------

If I have the Grid activeX setup to load the storm.agl, the row and col dimensions are wrong, the fieldwidth and precision is wrong, cell edit isn't enables,...

You mention AV2.0, where can I find out about this?

Regards
Richard

I think the difference is that cardioid.agl was originally created by a fortran program using the fagl library routines and storm110.agl by a C program using the agl routines. There's a flag as part of the agl file format that indicates the language (C or Fortran). If you open these files in Array Viewer you'll see there are some differences in the display. For example, in cardioid.agl the status bar displays the Fortran syntax: "real*4 M(2, 500)" while storm110.agl displays a C syntax: "uchar M[57][57]".

When you load storm into the grid control you're setting the C state which apparently is causing problems with the other properties.

You can find out more about AV 2.0 at: http://www.intel.com/software/products/compilers/fwin/array_vis.htm. Note that there's a free evaluation download. In Av 2.0 there's no language state as part of the file format, so you shouldn't run into the problem described above.

John

John,
Thanks again for the speedy reply.

I used storm.agl not storm110, and I'm using C not fortran to drive the ActiveX - but I guess that does explain why there are differences due to the initial data file selection.

I had a look at the site you suggested and found the Intel Array Visualizer - but it seems like it is bundled with Intel Fortran - which I'm not interested in. Do you know anywhere I can get the new Array Visualizer activeXs seperately?

Regards
Richard

Richard,

Sorry, but it's not available as a separate product. But it was the same with the Compaq Array Visualizer as well; you had to purchase CVF to get the product.

John

Richard,

As a C/Array Visualizer user, would you be interested in having AV bundled with Intel C++? I posted this question on the Intel C++ forum a while back, http://softwareforums.intel.com/ids/board/message?board.id=16&message.id=857, but didn't get much response.

John

Message Edited by ids.support on 02-02-2005 10:03 AM

John,
No, I've got a lot of apps written with MSVC++ that I have to maintain, and it's better the devil you know :-).

The Array Visualizer, and it's activeX controls, are really a seperate entity to CVF or IF - why not sell them as such too?
I'd be very interested, as I'm planning on revisiting several apps and including the grid and 2D controls - they're a perfect combination to display a matrix of data.

Richard

Richard,

For the foreseeable future, AV will only be available with Intel Fortran. But you can think of the product as AV with a bonus Fortran compiler included. :)

John

Leave a Comment

Please sign in to add a comment. Not a member? Join today