03-06-2013 08:25 AM
The same behaviour. The bitmap has not the updates. If i open the panel after saving it, the axes have different informations than in the saved bitmap although it should be equal.
03-07-2013 07:43 AM
I understand that the bitmap does not have the axes updates. But my main question was whether you can see those updates in the screen as soon as you refresh the UI with Ctrl+R while you're suspended on the GetPanelDisplayBitmap line.
Also, do you have the same problem if you don't hide the graph control and/or dim the panel?
Thanks,
Luis
03-07-2013 08:04 AM
I understand what you mean and my answer belongs to your question. I did the user interface update like you described it.
If you don't hide the panel than the axes will be updated of course.
03-07-2013 08:14 AM
Well I guess this kind of feature has been discussed before, see here.
03-08-2013 07:56 AM
Wolfgang,
I wouldn't think that the linked discussion is relevant in this case, since neither ATTR_REFRESH_GRAPH nor RefreshGraph are being used.
Vitali,
I still don't think we're understanding each other very well. I had asked you if the gaph updates correctly on the screen as a result of you refreshing the user interface manually, using Ctrl+R. Your answer is that the bitmap doesn't contain the updates, which I already knew. By the way, this question is not meant to be a solution for you. I'm just asking it so that I can narrow down the problem you're seeing.
In any case, I tried to reproduce the problem you're seeing myself. I can't run the example you posted, but I made some modifications to samples\userint\graphlegend.cws so that it would be as similar as possible:
I added the following line before the big switch statement in NewPlotCallback:
SetCtrlAttribute (panel, PANEL_GRAPH, ATTR_VISIBLE, 0);
while(i<100)
{
Delay(0.050);
ProcessSystemEvents();
i++;
}
Then, I added the following lines at the end of the switch statement:
SetCtrlAttribute (panel, PANEL_GRAPH, ATTR_VISIBLE, 1);
GetPanelDisplayBitmap (panel, VAL_FULL_PANEL, VAL_ENTIRE_OBJECT, &bitmapID);
SaveBitmapToPNGFile (bitmapID, "c:\\Documents and Settings\\administrator\\Desktop\\test.png");
I confirmed the same thing that you're seeing, which is that the bitmap has the updated plot but not the updated axes. However, once I added a ProcessDrawEvents call immediately before the GetPanelDisplayBitmap call, then I see the updated axes in the bitmap. This is why I was asking you that question: I've been trying to understand why refreshing the UI (either via ProcessDrawEvents or via Ctrl+R) solves the problem for me but not for you.
Luis
08-08-2013 11:00 AM
Hello,
I have been dealing with the same problem for a while now. Both with CVI 2009 and 2012, windows XP and 7 and different PC manufacturers. In my case the panel is set to active and visible but the axes are updated only if the display of the PC is on and the program (when run from scheduled tasks) is running in Windows XP mode. If the panels are not physically displayed on the PC monitor (e.g. hidden execution by Windows 7 scheduled tasks or condition after switching off remote desktop) the panel is not updated. I have tried to refresh the panel, process draw and system events with and without delays, etc., but nothing works, except keeping the monitor on. I hope this information helps to find the bug.
Best regards,
Marina