11-03-2010 05:47 AM
Hello All,
I am reading certain names from excel file and storing in an array. And if my array contains 10 strings(Names) then it should create ten Boolean ticks and that name should be given to them. I have done programming but every time it creates only one boolean and all names are given to same boolean check. Is there any other method???
I am attaching my program.
Thanks in advance...
Pals
Solved! Go to Solution.
11-03-2010 06:13 AM
Hello Pals,
I didn't understand your problem exactly. But may be u can take the array size of your names array from excel and then put the tick also in an array and index the tick array using an index array func. in a for loop with the number of iterations same as that of the array size of the names array. you will get exactly the same number of ticks as the number of names. Let me know if this is of any use..;)
Regards,
Nitz
11-03-2010 06:17 AM
Hi, Nitzy,
you understood properly, but i use array then i cant give different name to different checklist. So i didnt use it... But will try again what u suggested and let you know...
Thanks...
Pals
11-03-2010 06:26 AM
Hi again,
If your number of entries are not too large , also you can try putting some checkbox invisible on your front panel and programmaticly making it visible according to the number of name entries.. Hope this is not very studpid.:D
Regards,
Nitz
11-03-2010 07:30 AM
Hi,
Still its not working.... I cant see no of check box. I just see only one....
Thanks....
Pals
11-03-2010 08:29 AM
Hi pals,
Have you tried Nitzy's idea of placing more checkboxes on your front panel and only making them visible depending on the amount name entries?
Looking at your initial code I can see that you have auto-indexed the tunnels into and out of your for loops but also wired a constant to the N terminal, is that intended?
Regards,
11-03-2010 08:38 AM
Hi John,
Its like sometimes i will read ten values from excel so i will need ten check boxes, sometimes i might read 100 values from excel so will need 100 check boxed. So if there is any idea to create the check boxes = to my array will be benefited. About the array i was just doing try and error method so by mistake kept both...
If there is no other way then i have to go for that one only....
Thanks a lot...
Pals
11-03-2010 08:52 AM
Hi pals,
You could try using case structures shown below, with an array size going into the decision terminal.
So if the array size is from 50-101 then execute so many checkboxes...
See the picture below for the code to do so!
Regards,
11-03-2010 09:01 AM
Hi John,
Problem is that if i use Boolean as ref then only i will get property node as boolean text. text.But for 100 Boolean tick i cant make 100 Boolean ref and then convert it into cluster as in array again i cant give different names to different boolean tick. So i am facing problem in the initial steps only. if only one boolean tick then its no issues but in my case there is no fixed values... hope i am cleared to explain my problem.
Thanks
Pals
11-03-2010 09:30 AM
Your array of Boolean ref is an array to the same single Boolean. Not an array of ref to multiple Boolean.
You can't create Boolean controls on the fly so you must use another method.
I would use a tree control with check box symbols.
Omar