07-28-2014 08:52 AM
I'm using scripting to add XY Graphs to an unfinished VI if requested through a user prompt. I need the plots to suport multiple traces. The data type that we will be wiring to the graphs is an array of clusters like what's wired to XY Graph 2 in this snippet.
When I drop an XY Graph on the diagram (manually or using scripting) it defaults to taking a single plot like XY Graph in the above snippet (brown).
I have been unable to find the property or method that causes the XY Graph to accept the array of clusters (turn it pink). I found a work around by temporarily connecting it to a sub-vi that outputs the desired datatype, then deleting the sub-vi. That's a real kludge, and I don't want to leave it that way.
Does anyone know what property or method I need to change to cause a XY Graph to turn pink?
Thanks in advance,
David
07-28-2014 09:32 AM
I haven't looked specifically, but there is a common trick in scripting which can be useful here - create what you need beforehand and then just drop it in. This is more useful in more complex stuff, where you then don't have to write all of the scripting code, but can also apply here by simply saving a .ctl with the graph that you want and then dropping that (the New VI Object primitive should have a path input).
07-28-2014 09:41 AM
Good idea. file this under "Can't see the forest throught the trees." I used the same basic principal for the code (created a sub-vi that I drop in), but somehow this method escaped me relative to the control.
Thanks,
David