LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Draw Multiple Lines.vi - Problem setting up function

So I want to programmatically draw a line on the Front Panel by applying the "Draw Multiple Lines.vi" function in the Block Diagram. I have received help on this subject before, but I am unfortunately still having trouble setting up the function. Right now I have a Cluster Array - Constant that is plugged into the Draw Multiple Lines.vi but it gives me the quentessential error:

 

The type of the source is cluster of 4 elements. The type of the sink is 1d array of cluster of 2 elements.

 

You guys have addressed that error with me before, but I sort of keep getting it. Now attached to here is a JPG displaying my Block Diagram setup so hopefully I can be more clear.

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

I think you want something like this:

 

draw multiple lines.png 

0 Kudos
Message 2 of 4
(3,052 Views)

Thanks Jordan_M. One question though, those X/Y paired numeric indicators are bundled inside a Cluster Array as depicted by the brown boxes surounding each pair? And then those 2 brown cluster arrays are fed into a Build Cluster Array and then that is fed into the Draw Multiple Lines.vi? Sorry if my vocabulary is incorrect, but I just wanted to know if I'm understanding correctly your solution.

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

X and Y are numeric constants.  Each XY pair is a cluster.  The two clusters are wired into a "build array" function.  The output of the "build array" function is an array of clusters.  The array of clusters is wired into the "draw multiple lines" function.  See the illustration below.

 

annotated draw multiple lines.png

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