This suggestion leads on from the idea I posted here:
http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Rotate-Y-Axis-Name-on-Charts-Graphs/idi-p/2472520
I asked tech support the following based on the fact its using the index array function:
What if you had more than one text label? How would I know which specific label to move.
Here is their answer (slightly long winded so apologies but you need the full answer to appreciate the issue):
The code that I have sent just moves the label at index 0 to the Y scale co-ordinates. This is because the ‘Decos[]’ property node gives out an array of all front panel decorations. I have used ‘index array’ function which picks the decoration at index 0. This is not a problem in our code because there is just one decoration item on the front panel and we know for sure that we are moving this free label only (you can change the 0 to 1 and you will get a runtime error as there is no second decoration element).
Now, the real problem starts when there are more than one decoration items on the front panel. There is no way you can get the index value of the decoration items programmatically (because all you can get is the array of all decos[] and you don’t know the order in which the items are present in the array).
Luckily, LabVIEW places each item you put down on the front panel in a different layer. Also the index value assigned to the items is based on the layer in which an item is present. The least index i.e. 0 is assigned to the front most item. You can set the layer of the items by selecting the item and selecting ‘move to front’ or ‘move to back’ option from the ‘reorder’ tool in the toolbar (the icon that has two arrows chasing each other in a circle).
So, place all the labels on front panel. Starting from the label you want to appear last in the array, select each label and click on ‘move to front’. As you go sequentially through all your labels, the last label that you ‘move to front’ will have the index 0 and all the other labels in between will be automatically re-ordered in increasing order of index.
Whilst this method works fine and is ok if only dealing with a couple of items, it is clearly a very laborious and error prone method. It would be good if you could view and re-order the decorations like you can in a cluster so you could easily choose/determine which decoration to index as any accidental change in layers completely screws up the first method.
Regards
Mitch
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.