03-01-2010 08:33 AM
Hi Forum,
I came across this problem while working on this (http://forums.ni.com/ni/board/message?board.id=170&message.id=478607#M478607) thread.
I add values from 0 to 1 to a XY-graph as in the picture below. (And only this way!)
When the user presses print a reference of the graph is handled to a sub vi.
In this SubVI there is another XY-Graph.
Now I copy all important properties of the MainVI-XY-Graph to the SubVI-XY-Graph.
This happens inside another SubVI, but this does not matter. The copy process could also happen inside the first subVI. Just a space saver.
Then the Image of the SubVI-XY-Graph is printed via a method node.
What I found is :
Run the MainVI (SubVI MUST NOT BE OPENED)
Change the scaling of the x-Axis (eg from scale the x-axis from 0.0 to 0.1)
Press Print
The file c:\pic.bmp will contain the graph, but the scaling will be from 0 to 1 not from 0.0 to 0.1 !!!!
If you run with the subVI showing itself, this will not happen.
And if you define the xy-Graph contents like this:the error does not occur.
For those who followed me until here:
Is this only in my mind or IS THIS A BUG ??????????????????
Thanks for reading
Christian
Solved! Go to Solution.
03-01-2010 08:37 AM
03-01-2010 09:08 AM
I don't know whether this should be called bug or not, but I know that some properties can't be set when the FP is not loaded (e.g. FP window bounds).
My workaround was to set the FP state to hidden so the FP gets loaded but still isn't visible.
03-01-2010 09:12 AM
Properties applied to hidden objects (or objects on screens that are not open) are generally "noops" for performance reasons. If you think i have mis-read your description please post back.
Ben
03-02-2010 01:28 AM
Thanks to both of you!
Setting the vi invisible helped with my example vi!
It did not work before with the vi I use in my real Program, so I did not try it again; the problem might be somewhere else there....
But it makes sense that a rescaling does not take place when the vi is shown!
I'll try a little more and ask again if I run into trouble again.
B.t.w. it would be great if there was some kind of switch to force an update of an element.
Greets CR