LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add text line to list box

Solved!
Go to solution

Hi all,

 

I'm trying to add text lines programmatically,

 

what I'm tiring to implement is a simple text terminal for my software in order to show text messages.

 

My problem is that that I need to add text lines from different sub vi's.

 

Can any one recommend a good approach ?

 

 

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 1 of 7
(6,220 Views)

The list box has a Strings[] property, just update that array of strings.

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 7
(6,209 Views)

Send a reference of your List Box to the sub VIs and do what Yamaeda said ^^^.

 

Example_VI_BD.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 3 of 7
(6,207 Views)

Thank you guys for the replay ,

 

I know that but I'm having difficulty with changing the array in subvi

 

1. With the reference : how to change an array value in the subvi

2. With the process : if I'm updating a value in the array then the whole array inserts into the property of my list so basically it rewrite the entire array to the list on every change , isn't that a bit Wasteful ?

 

 

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 4 of 7
(6,202 Views)

1. Get array, modify, write array

2. Yes and no, as you and the program dont know if the next byte of memory is free you'll need to allocate the full array worth of memory, thus a new array. For a single item you'll use Replace array and hopefully the compiler is smart enough to only change that memory. 🙂

 

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 5 of 7
(6,195 Views)
Solution
Accepted by topic author Kobi_K

@kobi Kalif wrote:

1. With the reference : how to change an array value in the subvi

2. With the process : if I'm updating a value in the array then the whole array inserts into the property of my list so basically it rewrite the entire array to the list on every change , isn't that a bit Wasteful ?


1.

 

2. That's what you do for normal arrays as well.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 7
(6,190 Views)

Thank you all for the help ! the problem was solved. Smiley Happy

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 7 of 7
(6,161 Views)