LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need to create a refnum of an multicolumn listbox which its data type in array

Solved!
Go to solution

I am having an simple issue but for the life of me can't figure out how to create a refnum of an multicolumn listbox where the data type is in array format.  I have created one where the data type is in scalar (defaulted data type), but can't get the array data type version multicolumn listbox to work. 

 

Basically I want to have a refnum in subVI's so I can reuse the VI to adjust the column width, sort columns of the reference, etc.    All of it was working until I decided to change the multicolumn listbox's Selectable mode to be "1 or More Items".  When in that mode, the data type is changed from Scalar to an Array.  Basically it broke my connections and gives me an Class mismatch.

 

I created an example of it as attached.  Thanks for the help.

0 Kudos
Message 1 of 8
(3,472 Views)

Interesting, it appears that the Multi Column List Boxes are different types, even though there is only one entry under GObject for it.

0 Kudos
Message 2 of 8
(3,466 Views)
Solution
Accepted by Rhidium

Your working one has a MCLB set for one element.  Your broken one is set to select one or more elements.  That is why there is a class conflict.

 

In your broken VI, right click on the reference constant and Create Control.  Copy that control to the subVI, and connect our connector panel to that instead of the existing control.  Now you'll see working is broken, and broken is now fixed.

 

Does that solve your problem?

 

I see one other thing you can do.  In the subVI, right click on the reference control and uncheck "Include Control Type".  Now both VI's will appear unbroken.  You'll have to run it to see if the VI's are still functioning correctly.

Message 3 of 8
(3,462 Views)

@RavensFan wrote:

I see one other thing you can do.  In the subVI, right click on the reference control and uncheck "Include Control Type".  Now both VI's will appear unbroken.  You'll have to run it to see if the VI's are still functioning correctly.


Very nice! I didn't even know that option existed Smiley Embarassed

0 Kudos
Message 4 of 8
(3,458 Views)
Solution
Accepted by Rhidium

See if this works for you.

 

In your Multicolumn Listbox - Autosize subVI right-click the reference and Snap9.pnguncheck include data type.

 

mcduff

 

 

0 Kudos
Message 5 of 8
(3,456 Views)

@mcduff wrote:

See if this works for you.

 

In your Multicolumn Listbox - Autosize subVI right-click the reference and Snap9.pnguncheck include data type.

 

mcduff

 

 



@RavensFan wrote:

Your working one has a MCLB set for one element.  Your broken one is set to select one or more elements.  That is why there is a class conflict.

 

In your broken VI, right click on the reference constant and Create Control.  Copy that control to the subVI, and connect our connector panel to that instead of the existing control.  Now you'll see working is broken, and broken is now fixed.

 

Does that solve your problem?

 

I see one other thing you can do.  In the subVI, right click on the reference control and uncheck "Include Control Type".  Now both VI's will appear unbroken.  You'll have to run it to see if the VI's are still functioning correctly.


I believe both mcduff and RavensFan are talking disabling the "Include Data Type"... which works.  I knew it was something simple..  I had thought I disabled it when I was trying to fix it.. but looks like I must not have or else I wouldn't have came here.   Thanks again guys.  I really appreciate it.

0 Kudos
Message 6 of 8
(3,430 Views)

@Rhidium wrote:

@mcduff wrote:

See if this works for you.

 

In your Multicolumn Listbox - Autosize subVI right-click the reference and Snap9.pnguncheck include data type.

 

mcduff

 

 



@RavensFan wrote:

Your working one has a MCLB set for one element.  Your broken one is set to select one or more elements.  That is why there is a class conflict.

 

In your broken VI, right click on the reference constant and Create Control.  Copy that control to the subVI, and connect our connector panel to that instead of the existing control.  Now you'll see working is broken, and broken is now fixed.

 

Does that solve your problem?

 

I see one other thing you can do.  In the subVI, right click on the reference control and uncheck "Include Control Type".  Now both VI's will appear unbroken.  You'll have to run it to see if the VI's are still functioning correctly.


I believe both mcduff and RavensFan are talking disabling the "Include Data Type"... which works.  I knew it was something simple..  I had thought I disabled it when I was trying to fix it.. but looks like I must not have or else I wouldn't have came here.   Thanks again guys.  I really appreciate it.


Yes, that is what I meant.  I think Control was written so much in that menu that it got stuck in my head.  I should have double checked the exact label.

0 Kudos
Message 7 of 8
(3,403 Views)

@RavensFan wrote:
Yes, that is what I meant.  I think Control was written so much in that menu that it got stuck in my head.  I should have double checked the exact label.

I totally understood what you meant when I first read it.  Smiley Happy

I knew it was something simple.. but was beating my head on it.  Happy to say my alpha version of my program was a success.

0 Kudos
Message 8 of 8
(3,389 Views)