LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scripting and XY graph data type

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.

XY_Graphs.png

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

0 Kudos
Message 1 of 3
(3,363 Views)

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).


___________________
Try to take over the world!
Message 2 of 3
(3,357 Views)

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

0 Kudos
Message 3 of 3
(3,352 Views)