06-26-2008 05:10 AM
06-26-2008 05:56 AM
06-27-2008 12:03 AM
06-27-2008 01:54 AM
karpa wrote:
so i need to hold in an array all the handles?
can i do something like "change color of ALL green plots to transparent" (without using their handles..) there is a possibility to use a lot of thousends plots in a graph so this array with handles could be very big.. i'd like if it's possible to avoid the "handle" method..
No, not that I'm aware of.
But if you don't want to save all plot handles you could iterate through the plots and set their attributes. Simply store in a variable the handle of the last plot drawn on the grapf, then:
07-01-2008 04:15 AM
07-01-2008 05:35 AM
Your non-fatal errors may arise from trying to setting properties on deleted plots. Plot handles in a graph are never reused: every time you run your function you create a dummy plot to determine the final plot in the graph and iterate through plots conveniently setting the graph, deleting the dummy plot; this way you have some handles without any associated plot, so every time you try to access them you get the "invalid plot" error, as I warned you before. If you happen to delete some plots anywhere in the program this unconnected handles are even more.
To avoid annoying warnings like those, you could trap the return code from GetPlotAttribute and execute SetPlotAttribute only for actually existing plots. Apart this, you must either turn off the "break on library errors" in Run menu or use SetBreakOnLibraryErrors () function turning warnings off and on arount this part of code.
07-01-2008 06:29 AM
07-01-2008 08:42 AM
From Checking for Errors in LabWindows/CVI chapter in CVI on-line help:
When you develop applications in LabWindows/CVI, you usually have debugging and the Break on»Library Errors option enabled. With these features enabled, LabWindows/CVI identifies and reports programming errors in your source code. Therefore, you might have a tendency to relax your own error checking. However, in compiled modules and release executables, debugging and the Break on»Library Errors option are disabled. This results in smaller and faster code, but you must perform your own error checking. This fact is important to remember because many problems can occur in compiled modules and release executables, even if the program works inside the LabWindows/CVI environment.
07-01-2008 11:30 PM