12-07-2017 06:17 AM
@RavensFan wrote:
What would be the point of trying to find the size of an array constant on the BD?
Well, my first thought was that he was trying to use scripting to get the size of an array on a wire. Then I thought that he was trying to do something trivial. Then, reading his latest response made me think he was trying to use scripting to convert BD constants to FP controls with the appropriate number of elements visible.
@janed0714 wrote:
I would like to know if it is possible to find out array size on vi scripting.
What I ultimately want to do with that value is to define the number of rows visible on the front panel.
And...
@janed0714 wrote:
I am configuring things on vi scripting.
I converted an array constant to control via scripting.
I don't know why OP wants to find the size of an array constant, but I think that's what's been asked for.
12-07-2017 07:33 AM
Searching for array size is just a part of vi scripting. I am not using vi scripting just to look for array size.
I will try one of the solutions right now.
Thanks!
12-07-2017 08:03 AM
@janed0714 wrote:
Searching for array size is just a part of vi scripting. I am not using vi scripting just to look for array size.
I didn't think that you were. What's your overall objective? Was I on the right path?
12-07-2017 08:35 AM
I am trying to use "variant to data" function right now and came across one question.
I know I can just wire an array to "type" input in the function, but is there any code or name that I can simply wire to define the "type"?
I would like to know that for cases I need to use that function for some other data types than an array.
Thanks! 🙂
12-07-2017 09:04 AM
All I can suggest is a Case structure explicitly converting each type you expect to receive. You can use the "Get Type Information.vi" for the selector.
12-07-2017 11:05 AM
@janed0714 wrote:
I am trying to use "variant to data" function right now and came across one question.
I know I can just wire an array to "type" input in the function, but is there any code or name that I can simply wire to define the "type"?
I would like to know that for cases I need to use that function for some other data types than an array.
Thanks! 🙂
No, you can't "name" the datatype, you'll need to give an example (wire in the correct data type). If you want to go the other route you have some work with Unflatten from string ahead of you. 🙂
/Y