06-24-2011 01:14 PM
ok, i'll spill the beans. hahha
Graph one is living in the parent vi
graph two is living in the child vi
Name of the child vi = create image from graph
it accomplishs the same thing as export image, BUT does not require the vi to be open.
This can be accomplished by the method Get Image
however, export image is really pretty, it has a white background, the frame is white, etc etc.
However, i need to make changes to the graph,
size (optomize for printing a full page)
back ground color color
legend location
frame color
width of the plot lines
the best way to do this while still preserving all other settings is to use a reference to pass the original graph 1 into the subvi as a reference. BUT if this is done, i can't make changes to the reference property nodes because it will change the parent. SO a copy has to be made.
06-24-2011 01:24 PM
Pass the reference to both graphs to whichever VI is doing the work of changing properties.
If you want to change a property for both graphs, then make that change to both graphs using the reference to each graph. If you only want to change one of the graphs, then only write the changes using that reference. When you write data to a graph, then you can use a property node to write to the value property.
If you put the reference to each graph in an array, then you can wrap the property node in a For Loop with the array of references autoindexed so the loop will run twice, once for each reference.
06-24-2011 01:46 PM
I only start with one graph in the parent vi.......only one reference......I need to create a second graph in the subvi which is identical but has a different reference.
06-24-2011 01:57 PM - edited 06-24-2011 01:58 PM
The sub-VI can look like this
BUT
this is not copying the refs but using two refs to control from and to...
Ben
06-24-2011 01:58 PM
You say "create a graph" in second VI, but that graph in reality already exists, correct?
How are you opening/loading the second VI? If the second VI is in memory, you ought to be able to grab a reference to that graph.
Take a look at Ben's nugget on using control references. http://forums.ni.com/t5/LabVIEW/Nugget-Using-control-references/m-p/570756