LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Anybody know where I can find Draw Multiple Lines.vi?

I don't mean the actual function itself. I know you just right-click and scroll through the menus for that. But I want to find a VI that showcases how the Draw Multiple Lines.vi is used. As of yet I can't find one anywhere. I've read the Detailed Help that Labview provides when I look at the function under Context Help, and it mostly makes sense. The only thing that's not working is how to implement the array that provides the line points into the function. I tried connecting a 1D array to the function and it was no dice. I get the quentessential error:

 

You have connected two terminals of a different type. The source is 1D array of double. The sink is 1D array of cluster of 2 elements.

 

So I know there is a special array called a Cluster Array, I think. Does it want me to attach that instead?

0 Kudos
Message 1 of 4
(3,083 Views)

And does this function even do what I think it does? I just want to programmatically draw a line on the Front Panel from point A to point B. That's all.

0 Kudos
Message 2 of 4
(3,081 Views)
You can use the draw line VI to draw a line between two points.

The data type is an array where each single element in the array is a cluster of two elements. Right click and create a constant from the input terminal to see what it looks like.

LabVIEW can have a container on the front panel where you can programmatically draw pictures and this VI simply takes the array of x and y coordinates (the cluster) and connects the dots.

If you actually just want a line on your front panel that will never move you should just use a decoration though. A lot of the drawing examples we have use many different VIs to draw each image so I'm sure if you look through a drawing example you will find this VI being used.
Matt J | National Instruments | CLA
0 Kudos
Message 3 of 4
(3,039 Views)

@ShogunOrta wrote:

I just want to programmatically draw a line on the Front Panel from point A to point B. That's all.


You can only do it with the restriction that it has to be bounded to a picture indicator. To draw anywhere on the front panel, we would need this idea implemented. 🙂

 

A plain 1D array does not define points because each point has an x and a y.  Hierarchical data structure are actually quite easy once you play a little bit with them.

0 Kudos
Message 4 of 4
(3,011 Views)