07-07-2021 01:15 PM
Hi,
I'm trying to generate an PNG image that includes a graph and several other objects on the FP. If it were just the graph, I could use the Get Image invoke node for the graph. To include the other objects, my plan was to temporarily shrink the FP to match the region I want, then use the FP Get Image invoke node. My problem is that I can't write to the FP bounds property.
I also tried to write the graph bounds to the desired image max width and max height, but for some reason the image still shows the unmodified pane size.
A VI that summarizes my attempts is attached, and an image is below. Any suggestions would be much appreciated.
Thanks,
Allan
Solved! Go to Solution.
07-07-2021 09:10 PM
There is a Tool in the OpenG Toolkit (available using VIPM on the LabVIEW Tools Network) called "Fit Window to Largest Decoration". Draw a Decoration (I usually use a Flat Box, placing it under the Front Panel objects and sizing it to the boundaries you want, then run the "Fit Windows" at the beginning of your VI and watch the view "snap down" to the Decoration.
You can look at this function if you want to see "how do they do that?", but you can also just use this code. The OpenG Toolkit has been around for many years, and has been thoroughly tested ...
Bob Schor
07-07-2021 09:18 PM
Thanks, I'll give that a shot. I was aware of that OpenG VI, which I had used previously for sizing of VIs in subpanels, but I had forgotten about it.