Change properties of controls in an array of clusters

Hello,
my latest problem:
i display larga amount of data using arrays of clusters.
the user has to be able to inserst clusters in between, therefore the array solution seems perfect.
However, for each cluster, once a sub-control is defined, i would like some other sub-controls to either become invisible, visible, change ring values...etc.
i could not find any way to do it whatsoever. anybody has an idea?
... And here's where I keep assorted lengths of wires...

Hey good work!
I sounds like you are on the right track, so here are a couple more things to throw into the mix. First, remember that given a reference to a "top-level" cluster you can extract references to all the controls inside it on the fly. For example, you take a cluster reference, it has a property called "Controls" this is an array of of references to all the controls inside that cluster. If each of those references is itself a cluster, you can in turn get references to all the controls inside them. Hence you don't really need references to each individual control on the front panel. In fact, all you have to do is figure out how to update one of the inner clusters and then put that code inside a loop so it executes once for each reference in the top-level cluster's Controls property array.
Second, think about how you can generalize the operation such that the you can turn them into subVIs that you can use no matter what the structure of the clusters might be... The information is all there in the control properties.
Finaly, yes I can post an example. I'll put one together this evening and try to get it up online.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • How to change the tabbing order of an array of clusters?

    How to change the tabbing order of an array of clusters?  I have the cluster arranged in table in the front panel.   The cluster element goes horizontal and array element goes vertically.   When I press the tab key, the cursor goes to the next array element instead of the next cluster item (down instead across).
    Solved!
    Go to Solution.

    Broken Arrow wrote:
    Harold asked a perfectly reasonable and necessary question, but how is that a Solution ???
    I believe it is called the Socratic Method.
    Sea-Story time
    I had the privledge of working for Ron Davis when he managed the Allegheny District of DEC. He was an ex-WO4 (Highest possilbe rank for non-commisioned officer in US Navy, required act of congress to confirm).
    Ron never answered any question I ever saw presented to him. I remember a group of managers in a frenzy over some issue  running to him to to see what he thought. He asked them a series of questions that lead them to the solution and soon they were smiling and slapping each other on the back as they walked away.
    Who is that has a signature that read "it is the questions that guide us"?
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Colorbox control in an array of clusters

    hi, im working on labview 6. i have an array of clusters. the cluster has eight elements. one of them is a colorbox control. I want this colorbox control to have only 4 colors i.e, the user has a choice of only 4 colors if he clicks on the colorbox control. can ihave such a control?

    Hi Pavitra,
    Use labview Help to guide you.
    Or else,
    A new picture ring control or text and picture  ring control has one item with an empty picture display. You must copy a picture to the clipboard before you can import the picture  into a ring control. LabVIEW can import all graphic files your graphics software supports.
    Complete the following steps to import pics  into ring controls.
    Copy a picture to the clipboard.
    Right-click the ring control or text and picture ring control and select Import picture from the shortcut menu.
    Copy another Pictureto the clipboard.
    Right-click the ring control or text and picture ring control and select Import picture Before or Import picture After from the shortcut menu.
    Use the Operating tool to click the picture box to view all imported pictures
    regards
    Dev

  • Generating events from a control inside an array of clusters

    Hi, I have a question regarding UI events. I would like to capture a mouse down event generated in a string control inside of an array. Each element of the array is a cluster that has a Boolean control, a numeric control and a string control. When I try to add an event to handle the mouse down the only option available in the event structure is the one available for the entire array. If this is not possible to map event from the individual controls inside of the each cluster that are part of the array, could you provide with an alternate way of "knowing" when the string control is selected. The application has a touch screen without a keyboard and mouse. I need to display the touch screen graphic keyboard when the textbox is selected.
    Thanks,
    Diego F.

    I'm not sure, but I think your only option may be to do some calculations. The mouse down on the array will give the coordinates of the click in VI coords. You can get the coords and size of the cluster and the coords and size of the string using their property nodes. Then, you have to calculate whether the click was on one of the visible strings using addition, subtraction and quotients. Once you make a subVI out of this, it should be easy to use.
    You should watch out for the index display and the label, as they change the values of the coords. I'm sorry, I can't think of any easier way to do this.
    Correction - I just thought of one. If you use the KeyFocus property on the string inside the mouse down event, it seems to work. I'm not sure whether this will work when bringing the keyboard to the front, which is why I left the other suggestion in place. Here's my test (7.0)
    Try to take over the world!
    Attachments:
    key1.vi ‏29 KB

  • Change properties of a cluster element withing an array of clusters

    Hello all,
    I have an array of cluster that is shaped as a line with different display elements.
    A list or a tree wouldn't have made it, so I had to use a cluster and make a table.
    The problem is that I want to change not only the text but also the text color.
    Individually.
    I found this :
    http://www.ni.com/example/30904/en/
    But it change the property in all the clusters in the array, not just the one I need.
    Some people have the same problem :
    http://forums.ni.com/t5/LabVIEW/Reference-to-Array-of-Clusters-with-an-array-element/td-p/1006427
    http://forums.ni.com/t5/LabVIEW/Different-set-of-values-for-two-rings-in-an-array-of-clusters/m-p/10...
    http://forums.ni.com/t5/LabVIEW/array-of-clusters-get-references-to-all-the-clusters/td-p/1079456
    http://forums.ni.com/t5/LabVIEW/How-can-I-reference-the-properties-of-a-control-in-a-cluster-in/m-p/...
    http://forums.ni.com/t5/LabVIEW/Writing-only-to-certain-cluster-elements-in-an-array-by/m-p/2200728
    http://forums.ni.com/t5/LabVIEW/Update-Properties-Of-One-Control-In-An-Array/m-p/3015501
    http://forums.ni.com/t5/LabVIEW/Array-of-clusters-and-in-the-cluster-is-a-bar-meter-how-can-I/m-p/15...
    http://forums.ni.com/t5/LabVIEW/Property-node-of-a-control-inside-of-cluster-inside-an-array/m-p/946...
    Obviously, while in a list/table or tree you can change the property of an individual
    cell (font, color) you cannot do it within an array of cluster, by some sort of magic,
    the property of a cluster element (font, color) are all linked together, hence rendering
    the use of an array worthless.
    A possible hack is proprosed by using control masking, setting one visible and the
    other invisble, swapping their position, whatever. It's a hack you have to perform,
    hence add another code to maintain.
    Is that still the case or is there now a more official way to handle individual cluster
    properties, not just its data ? After all that's a common real-life example that should
    be handled by Labview. In my opinion.
    David Koch
    Solved!
    Go to Solution.

    altenbach wrote:
    One of the elements could be a 2D picture indicator of about the same size. You can write text in any color using picture functions.
    Here's what I had in mind. Seems to work just fine (I would fine-tune the font, picture border, etc. but this should get you started).
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ColorText.png ‏13 KB
    ColorText.vi ‏9 KB

  • How to change property of control inside a cluster?

    Hello,
    1)
    I have cluster with dozen controls (booleans and slides).
    I want to change the slides control scale property in runtime.
    Im doing UnbundleByName to the cluster to pick the right slide, but how i continue from here? how i access to that slide property?
    2)
    The main problem is that i have vi with lot of controls, and i want to find a way to save the control values to file, so i decide to insert all those controls to cluster, and to use datalog...Is there any other elegant way?
    Tnx,
    HaD
    Message Edited by HaD on 08-06-2007 03:43 AM

    Hi HaD,
    controls usually have properties for Caption and Label. You can check one or both for the name of your control...
    The array of control references should contain the references in the tabbing order, but it's always a good idea to cross-check that you use thoe correct reference
    Message Edited by GerdW on 08-06-2007 11:21 AM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Accessing button properties in an array of clusters ...

    I have a situation whose solution is eluding me.
    I built an array of clusters (15 of clusters in the array). Each cluster is a boolean LED control and a path control.
    The array is wired to various VIs. One of these VIs is supposed to
    select a path from the array and then change the color of the LED that
    is clustered with that path. The path part works because I am reading
    the value of that array element. The problem is that I don't know how
    to get to the associated LED properties.
    I have used several approaches, but in all cases: when I change the color of the target LED, all 15 LEDs change color.
    Inside of a while loop with indexing enabled, I have unbundled the
    current cluster and then tried to apply a property node to the LED
    element but all LEDs change color.
    So the question is - How do I access the individual LED properties in an array of clusters?

    In an array only the values can be different for different elements. The properties are the same for all elements.
    You can work around this by using a color box, which has the color as the value.
    Here is an example of a color box customized to look like a LED with an explanation of how it was created.
    Try to take over the world!

  • Change a property of a specifc array element (array of type defs)

    If I have an array of elements, and I want to change aproperty of one specific element, at position X, is there a way to do this?
    Basically, I have an array of string indicators indicating certain tests attached to certain ports, and I want to change the text to bold on certain indicators, and i want to color certain indicators green or red.  Any chance in an array or clusters only? 
    Thanks Guys.

    While you can't change the properties for a single array element, there are solutions.
    For the background color, you can turn the array element into a cluster of your string (which would be transparent) and a color box which will be the background. You can then change the value of the color box and the color will change.
    For the bold text, I think your only option will be to get rid of the string control and make the array element a picture control instead. Using the picture VIs, you can draw a colored rectangle and then place text inside it (and each element can have different text properties). That way, you won't even need the color box.
    Try to take over the world!

  • Is it possible to define a control as an array of ring box?

    I'd like to have a controle array that I can define the dimension and restrict the value that theuser can enter. I thought about an array of ring box for wich I could initialyse the dimension . Is it already possible? any cue to where I sould be starting?
    Thanks,
    Olivier
    Solved!
    Go to Solution.

    All elements in the array will have the same set of values. 
    To change ring strings programmatically, use Strings and Values property. You can link the reference to an array element, it will change properties of all elements.
    It will be more difficult to restrict user to enter different sets of data into different array elements.

  • Change properties inside dynamic stack plots

    Is there any way in LabView 8.2 now to change the properties of indicators inside an array or cluster?  I want to change the properties of the waveforms inside DynamicStackPlots (http://zone.ni.com/devzone/cda/epd/p/id/3024).  I see on this forum back in 2005 this was last discussed.  I have also tried making a cluster of waveforms (instead of an array of clusters) from which you can at least separately access properties (allowing you to make specific waveforms not visible, yielding dynamic stack plot functionality).  But you STILL cannot modify, say, the plot min range, label, scale... etc.
    All ideas welcome!
    Thanks,
    Adam

    Hi, Adam.
    This question seems to pop up every once in a while. The answers are different for arrays and clusters:
    Clusters
    You can access the properties using an explicitly-linked property node (IE, one that takes a control reference as an input). You can obtain a reference to the controls in one of two ways:
      - Right-click on the control (inside the cluster) and select Create»Reference.
      - Create a property node for the cluster and access the Controls[ ] property. This will give you an array of references to the controls inside the cluster, and you can pass that into the explicitly-linked property node. (You may have to use a To More Specific Class VI if you want to access properties that apply to only graphs.)
    Arrays
    Since arrays are for holding a large quantity of indentical data types, the properties for all elements of the array must be the same. If you really want to sidestep this functionality, however, you can always create an array of references to controls. If you wanted to do that, you'd have to create all your controls individually and then create references for them one by one. Once the references are created you can pass them into a Build Array VI. To alter the properties of any particular control, you'd use an explicitly-linked property node and pass in the appropriate reference.
    Let me know if any part of this isn't clear. Have a nice evening!
    Message Edited by sarahk on 10-25-2006 04:35 PM
    Sarah K.
    Search PME
    National Instruments
    Attachments:
    clusterControlReference.GIF ‏6 KB

  • How can I change the precision of a numeric array indicator using property nodes ?

    I want to change the precision of a numeric array indicator programatically using property nodes. I tried to see all the array properties but I couldn't find it. URGENT !!!

    If you want to change the precision of an element in an array you must first get the reference to the array element. Then raise the reference to the more specific class of a digital numeric. Use a property node connected to that reference to set the precision. See the attached vi for an example.
    Brian
    Attachments:
    ArrayElementPrec.vi ‏27 KB

  • Array of clusters and in the cluster is a bar meter, how can I change the color individually?

    Array of clusters and in the cluster is a bar meter, how can I change the color of the bar meter individually for each element of the array?  I have just figured out that you can't change properties of one element of the array without all elements changing.  For the scaling I had to make numeric indicators for each tick of the scale so that each bar meter in the clustered array would have individual scales.  I also had to do some math to scale each barmeter to display correct proportions from 0 to 100%.  Now I'm stumped on the color of the bar meter.  Basically, if the value goes over a setpoint, the bar meter needs to turn red.  It has to be in an array to be infinitely scalable.
    Thanks
    Matt
    Solved!
    Go to Solution.

    You can't do that-
    without a little trick.
    You could consider laying a custom color box over the bar graph in the cluster you can set the color based on the value of the bar graph or even make a "Pseudo"- bar graph using a series of color boxes stacked to look lie a bar and changing values of the Color boxs from empty to full to red.
    Here is an example to demonstrate
    Jeff
    Attachments:
    Pseudo bar.vi ‏12 KB

  • Event Structure's value change, not detecting changes when tabbing thru array of clusters

    Hi!  I have an array of clusters (int, int, string, int) control, and want to detecting changes made to the it.  I used the Event Structure's value change case on the array, it works excellent except that it'll only detect the changes when you click out of the element or press the enter key (the one by the numbers, not carriage return).  I want it to detect the changes when I tab thru the cluster or array too, but I can't figure it out... Does anyone have any ideas?
    Thanks!

    mfitzsimons wrote:
    altenbach
    Tried Value Change with my example done in 7.1 and it doesn't trgger an event.  That is why I suggested Mouse Down.
    Curious. I did a few minor edits in 8.0 before saving as 7.1, but the simple value change event got triggered just fine when the value vas terminated with a tab in 7.1. Every time.  Strange....
    Are you on 7.1 or 7.1.1? Maybe there's a difference (I am using 7.1.1).
    LabVIEW Champion . Do more with less code and in less time .

  • Keyboard "tab" control in Array of Clusters

    I'm trying to polish some of my LabVIEW user interfaces so that my users can work faster in them and so that they follow more "Windows UI Standards" (or whatever).
    I have an array of clusters.  The cluster has 3 numerics.
    When a user "focusses" on the first numeric within a cluster and hits the tab key, it moves the focus to the second numeric.  Hit tab again, and it jumps to the 3rd numeric.  Hit the tab key a 3rd time and it jumps back to the first numeric in the cluster.  What I want to happen is for the focus to move to the first numeric in the next element of the array.
    I've started to play around with the "Key Down" event case that has a conditional looking for "TAB" and then checks the "FindCtrlWithKeyFocus" with the last numeric.  My probes within this event show that the "TAB" key detection is working, but the "FindCtrlWithKeyFocus" never has a TRUE output from the "CtrlFound?" output of the Invoke Node.
    Even if I did know if tab was pressed in the last element, I'm not real sure how to move focus to the first numeric within the next cluster element of the array.
    A numeric array behaves in the correct way.  I could get the program working the way I want with a 2d array of numerics.  However, each numeric has different data entry parameters and there is also a lost of "self documentation".  I would like to find a solution because this has come up with other, more complex, array of clusters that would not be solveable with a 2d array of a base type.
    Seems overly complicated to me.
    Bonus Question: The default value of my numerics is 0.  When my user clicks a numeric the cursor is on either side of the 0 and the user has to delete the 0 prior to their data input.  When a numeric is entered via the Tab key, the whole field is selected.  When the whole field is selected, whatever the user inputs will replace the original "0" that was in the field.  Anyway to have the whole field selected when the user uses the mouse?
    Sorry for the wall-of-text post (and the preposition hell).  Thanks for your input.
    Solved!
    Go to Solution.

    Well I've gone and gotten the tabbing behavior you're looking for.
    -the key is to set "skip when tabbing" on the controls inside the clusters to true, and leave it false for the array elements.  Now when keyfocus is on one of the cluster controls and Tab is pressed, LV will put the keyfocus on the next visible array element.
    -then use a "key down?" filtering event to check and see if any of those controls have keyfocus when Tab is pressed.  If so, and it's not the last control in the cluster, discard the keypress and programmatically advance keyfocus to the next item.  
    -Finally if the Tab press was not discarded, use a normal "key down" UI event to check if one of the array elements now has keyfocus and if so, set KF to the first control in its array.
    So in short, this setup turns off tabbing along a row so that every tab will move to the next row.  Then it filters out Tab if it's not yet at the end of the row.  Finally, it automatically puts the cursor in the first column when the row has advanced.
    One significant drawback is that it only tabs between visible array elements.  You can probably make it auto scroll.
    I'll leave it as an exercise for the reader to handle the shift+Tab (reverse tabbing) key presses.
    To me, this runs up against three holes in LV UI programming:
    1) Array Element events should be available.     The Array:Key Down event only handles key presses when the array has keyfocus, not when things inside it do.  Any kind of key filtering has to be done at the VI level (!!!).
        The data source for these events should include the element index (eg what cell was clicked on?)
    2) There aren't effective ways in VI server to deal with individual array elements.  I recognize that some of it is the basis that array elements have the same properties, but there are display and selection properties that do differ between cells.  I ought to be able to specify that a particular cell index has keyfocus.  Arrays, why can't you be more like Tables?
    3)Tab order should be flat, not hierarchical.
    edit: in case the snippet messes things up, file is attached.
    -Barrett
    CLD
    Attachments:
    Tab through cluster array elements.vi ‏28 KB

  • Programmatically changing string text color in an array of string indicators

    Hi,
    I have an array of string indicators and I'm trying to format certain values different colors.  While I'm able to do this on a single string indicator I can't figure out how to handle the indexing of the array.  I have seen several examples with array of clusters but I am unable to translate to array of string indicators.
    Any help would be appreciated.
    Regards,
    ShotSimon
    Attachments:
    Changing text color in an array of string controls.vi ‏9 KB

    Instead of a string array, where all elements have the same format, you should use a table, which basically behaves as a 2D string array. But there, you can adjust all text attributes (if you are using LV 8.x). See this thread
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

Maybe you are looking for

  • Library is not going onto my iPod

    I burned a CD into my library and clicked update iPod to get the songs. The songs were not showing up on my iPod, so I tried a second time with another CD. Still wasn't working. I decided that actually installing the newest update might help so I did

  • Oracle Portal Redirection

    Hi, I am running a form. I want to display an error message when a record with a certain criteria is existing. I have created a label - error_label (not related to any tables). In the Save button of the Form I have written the following code: p_sessi

  • Target Cost in process order

    Dear All,   I have activated the version 0 only and the valuation variant for the actual cost has been assigned as plan price for the period for both of variants of plan and actual.   when the order confirmed the actual cost is alone gets updated the

  • Startup Questions Issues (Again)

    I've read numerous discussions of startup issues but haven't been able to solve our problem. Maybe someone might have a suggestion. Thanks for any help you might be able to offer. We have a white 12" iBook 700 MHZ running OS 10.3 that startups very e

  • Can I use mp3 ringtones on a iPhone 5?

    I would like to use my own MP3 songs on my iPhone 5. Is there an option to do that in the settings? This is my first iPhone so I'm not really sure how that would work.