LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

GetPlotAttribute and SetPlotAttribute of a Rectangel?

how can i use GetPlotAttribute to obtain the (double x1, double y1, double x2, double y2) of a Rectangel which is plotted by PlotRectangle. And then use SetPlotAttribute to reset them or replot this rectangel when the resetting is impossible?
 
any suggestions are appreciated!
Thanks
Jiafei Peng
0 Kudos
Message 1 of 4
(3,444 Views)

Jiafei,

You can use the PlotPolygon function, which will do the same thing for you as PlotRectangle, then you can use the  ATTR_PLOT_XDATA and ATTR_PLOT_YDATA attributes of GetPlotAttribute to get the x and y data from a plot.

Message 2 of 4
(3,431 Views)
In addition to Dave suggestion, please note that you cannot modify plot data: you will need to always delete previous plot and redraw a new rectangle with updated values.

Message Edited by Roberto Bozzolo on 07-24-2006 08:55 AM



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 3 of 4
(3,422 Views)
Dave and Roberto,
 
thank you very much for your suggestions.  I have already succesefully applied PlotPolygon. And it works exactly like required.
because ATTR_PLOT_XDATA and ATTR_PLOT_YDATA  can be obtained easily by GetPlotAttribute and then redraw this Polygon.
 
Thanks again
 
sincerely
Jiafei
0 Kudos
Message 4 of 4
(3,404 Views)