Connect Wire does, but Add and Remove Chunk do not (I used LabVIEW 2010). Resize growable nodes in 2009 by first queying for the current height (use Master Bounds Rect and subtract the Bottom from the Top). Now get the Terminal Height and either add or subtract it from the current height, depending on whether you want to grow or collapse. Finally use the Resize method to set the new height. You can see why we fixed this for the official release of scripting. There may be slight differences in the way different growable nodes react, so be prepared to experiment.
I am stuck at how to create an array indicator. I found the way to create an array control and put a DB inside it to generate a valid array control, but what I really wanted was an array indicator. There is no 'indicator' object anywhere, or I did not find it? Help PLZ. Thanks.
I had posted a question about scripting on the LabVIEW discussion board earlier today... now I found this.
Here is the link:
I would appreciate any assistance.
This works fine here:
Without your actual code I don't know what the problem is with your example. The minimum would be seeing if you get an error and where it's coming from. If you're not getting an error then you need to clarify what you mean by "does not work". It would help if you upload the actual VI.
I found out why my code did not work. Notice the conversion red dot in your code; they are not in my code. The difference between your code and mine is that I created the default enum control from the VI. When I switched to the updated enum, my code works fine too. So the default enum must have been outdated. Thanks for the help.
I just started toying around with LabVIEW scripting. My ultimate goal is to use an 'Array of String' control and de-index it through a for-loop to create Indicators of type '1-D Array of Boolean' and label each one with the current element of the string array . The best I've been able to do is create *Controls* that are of type '1D Array of (void)' and I have no idea how to set their Lable name. I'm getting closer but I could sure use some direction.
You set the label of anything using the Label.Text property. Remember that array elements all have the same label (array elements all have the same properties, but can have different values). To create an array of any type, create the array, then create whatever you want to put into it with the array as the owner. Alternately, you can create the contents of the array, then use the Move method to move it into the array.
What is the "unofficial" method to expose those extra elements? I am trying to find a way to script the creation of FPGA code involving fixed-size arrays of fixed point numbers. Any idea if this is possible?
Trevor -- Have these methods since been officially exposed?
In another thread I saw a reference to "plug-in released for the scripting by the R&D which you can install so that you can see all the property nodes ...." and it gives the link to this community. This is fine, but I don't have the time to search all of the posts on 8 pages to try to find the plug-in.
Does anyone know where it is? Is there a central repository for plugins / tools that have been created for sharing? (searchable?)
Follow-up to the above message:
I have a case structure with many cases in my program (for various states) and as I've been programming, some of those cases have become obsolete. I was wondering if there is a way to pull out the names of cases that are active (ie have a case) and compare that to the ENUM control so that I can delete names of cases not being used?
Any thoughts, Ideas?
It's easy to get the names from the enum, but in my case that does not directly translate to the valid cases in the case structure itself.
Thanks for any input.
I am unsure what you are asking in your first question. If you want to know what property nodes are available for use, use the class browser. It is native to LabVIEW. Select View»Class Browser or hit Ctrl-Shift-B. If you want to find all the property nodes in a VI or set of VIs, use the Find & Replace function (Edit»Find and Replace...). Please elucidate if I have misunderstood.
You can get the current states from a case structure by using its Frame Names property (nearly at the end of the property list).