Obtaining a reference to CURSOR LEGEND (Tree Control) of a graph (for purposes of compressin​g it)

The Captain (Norm Kirchner) told me awhile back how to obtain a reference to the Cursor Legend of a Graph so as to be able to compress it (the cursor legend is a tree control that unexplainably likes to expand at times).  Norm, if you are still there or if someone else knows, please provide instructions for all to see.  Much obliged as I have searched everywhere in my email and notes and cannot find the correspondence.
Thanks,
Don

If it is indeed impossible to create a reference to the cursor legend tree, then how was I able to do what I did in the attached VI?
(Expand one or both of the cursor trees in the legend and then run the VI.)  See the block diagram.
Note that I don't remember how I did it either (which is why I posted this originally).  I had notes on this in an email exchange with Norm Kirchner but I think during our change of email clients, it got deleted.
Don
Attachments:
cursor_tree_legend_reference.vi ‏14 KB

Similar Messages

  • Cursor Legend Tab Control BUG

    Attached is a VI illustrating a bug with the Cursor Legend when graphs are in tab controls. If you enter in a number in the "Cursor X position to move to", then switch pages on the tab control, you'll notice the cursor has moved to the appropriate place, BUT the cursor legend has not changed to reflect that. Once you manually move it, it updates.
    In short, if the cursor position changes programmatically, the cursor legend will update ONLY IF THE XY GRAPH IS VISIBLE, even though the cursor position DOES change.  
    I hope someone from NI will see this post and add it to the bug list (if not already there??). If anyone knows a work around, that would be appreciated also.
    Michael
    Using LV 8.2
    Attachments:
    CursorLegendTabControlBUG.vi ‏27 KB

    Good idea. It doesn't work exactlly, but gave me the idea for how to work around. It appears even if you have a tab value change event doing the same thing the Cursor X Position numeric indicator value change event, the cursor legend X value will not change. You can even try entering the same value in the indicator and pressing return after switching tabs, the cursor legend will not update. It thinks for some reason it is on the correct index. I made a Tab Value change event that first moves the cursor to the next index, then moves the cursor back to the correct index. Ugly but works. Hopefully in the next ver of LV they will have fixed a lot of these cursor bugs; there is definitely some work to be done (i.e. fixing cursor X position for XY graphs, an extremelly annoying bug)
    Michael
    Message Edited by miguelc on 02-23-2007 03:49 PM
    Message Edited by miguelc on 02-23-2007 03:50 PM
    Attachments:
    CursorLegendTabControlBUG_wrkaround.vi ‏34 KB

  • Need help regarding tree control

    hello guys,
    i m working on one Flex slideshow application and i m using Xml loaded tree control with swf loader for this. i want to create next previus button for nevigate this slideshow but i dont know much about action script... please help me
    i will provide u code of my script if you need to correct it or suggest me how to make it.
    thanks in advance
    sagar

    here is sourcecode of my file
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" showCloseButton="true" close="PopUpManager.removePopUp(this);" width="1366" height="768" title="Promotions" fontFamily="Verdana" fontSize="13">
        <mx:Script>
            <![CDATA[
                import mx.managers.PopUpManager;
                private function processLogin():void {
                    // Check credentials (not shown) then remove pop up.
                    PopUpManager.removePopUp(this);
             import mx.effects.easing.*;
                     //index button script
             private function toggleBtn(e:MouseEvent):void{
                if(e.currentTarget.label== 'Open')
                    panelOut.play();
                else
                   panelIn.play();
                    import mx.collections.ICollectionView;
                    import mx.events.ListEvent;
                    // tree control script
                private function tree_itemClick(evt:ListEvent):void {
                    var t:Tree = evt.currentTarget as Tree;
                    var dataObj:Object = evt.itemRenderer.data;
                    var item:Object = Tree(evt.currentTarget).selectedItem;
                    if (dataObj.hasOwnProperty("@src")) {
                        swfLoader.source = dataObj.@src;
                    } else if (t.dataDescriptor.isBranch(t.selectedItem)) {
                        swfLoader.source = null;
                        tree.expandItem(item, !tree.isItemOpen(item), true);
                        panel1.status = "";
                private function tree_labelFunc(item:Object):String {
                    var children:ICollectionView;
                    var suffix:String = "";
                    if (tree.dataDescriptor.isBranch(item)) {
                        children = tree.dataDescriptor.getChildren(item);
                        suffix = " (" + item.children().length() + ")";
                    return item.@label + suffix;
                private function swfLoader_complete(evt:Event):void {
                    panel1.status = (swfLoader.bytesTotal/1024).toFixed(2) + 'KB';
                private function init():void
                        systemManager.stage.displayState=flash.display.StageDisplayState.FULL_SCREEN;
            ]]>
            </mx:Script>
            <mx:XML id="dp" source="data/dp.xml" />
       <mx:Canvas x="30" y="-1" width="1315" height="725">
       <mx:Panel id="panel1"
                    width="1310"
                    height="712"
                    backgroundColor="white"
                    borderThickness="0"
                    borderThicknessBottom="0"
                    borderThicknessLeft="0"
                    borderThicknessRight="0"
                    borderStyle="none" cornerRadius="0"
                    headerHeight="0" left="2" y="3">
                <mx:SWFLoader id="swfLoader"
                        scaleContent="true"
                        complete="swfLoader_complete(event);" />
                <mx:ControlBar>
                </mx:ControlBar>
            </mx:Panel>
       </mx:Canvas>
    <mx:Move id="panelOut" target="{panel}" xTo="0" effectEnd="btn.label='Close'"
          duration="500"/>
       <mx:Move id="panelIn" target="{panel}" xTo="-283" effectEnd="btn.label='Open'"
          duration="500"/>      
       <mx:Canvas id="panel" width="314" height="725" x="-283" backgroundColor="#00A2FF" verticalCenter="-1">
          <mx:Grid x="10" y="10" width="299">
             <mx:GridRow width="100%" height="707">
                <mx:GridItem width="100%" height="100%">
                <mx:Tree id="tree"
                        dataProvider="{dp}"
                        labelFunction="tree_labelFunc"
                        showRoot="false"
                        width="269"
                        height="706"
                        itemClick="tree_itemClick(event);"  alpha="0.85" backgroundColor="#C0E1FF"/>
                </mx:GridItem>
                <mx:GridItem width="22" height="100%" verticalAlign="middle">
                   <mx:LinkButton label="" id="btn" width="22"  height="707"
                            click="toggleBtn(event)" icon="@Embed(source='assets/index.png')" enabled="true"/>
                   </mx:GridItem>
             </mx:GridRow>
          </mx:Grid>
           <!--Add the content of your sliding panel here  -->
            </mx:Canvas>
    </mx:TitleWindow>

  • XY graph cursor legend in another VI

    Hi,
    I have a XY graph on my main VI. On the main VI there is little space for the cursor legend so I would like to move it into a separate frontpanel that can be popped up on demand. I managed to use the graphs reference to get all information about the cursors using the 'cursor list' property. However I would prefer to use the original cursor legend control since it already provides all the features I need. Is there a way to do this without copying all the graph data over to the second VI? I'm using LV8.21
    thanks
    klaus
    Message Edited by KlausS on 06-13-2007 01:43 AM

    I'm quite sure it's not possible to split a control over multiple front panels.
    Another possibility would be to use the original cursor legend placing it in the least bad position and show/hide it by means of the Cursor Palette Visible property.
    You wouldn't be allowed to move it, though.
    Paolo
    LV 7.0, 7.1, 8.0.1, 2011

  • How do I programmatically determine the cursor legend refnum?

    I am determining the controls and such of a front panel programmatically as I have a need to be able to modify panels quickly without the manual editing necessary. I need to know how to determine the refnum of a cursor legend for a waveform or XY graph in a programmatic fashion rather than by creating a reference node.

    That is a good question. The cursor legend reference is not returned if you get a list of all the object references. The graph is, so you can get its reference and get the cursor legend reference from it. You probably only need to look at the ones with a visible property set to true.
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]

  • How can I save the all the values of a tree control ?

    I have a problem, in run time, I adds new items on a tree control, but i don´t know how I can save the values of the child text of each item in a file.
    Thanks.

    I'm no expert on the tree control, but I made a small example to save all items to a textfile, including item tag, item string, and indent level. One drawback of this method is that it fully expands the tree regardless how the user left it. To go the other direction, you'd have to write a routine to go through the text file and programmatically build the tree.
    To master the tree control, I think you have to resort to creating a control reference for it and using the Invoke Node to do some operations. For another approach to traversing and operating on a tree, check out the "Traversing Tree Controls and Setting Custom Symbols" (search the NI Developer Zone site).
    Best of luck,
    John
    Attachments:
    Save Tree Structure to Textfile.vi ‏32 KB

  • How to get position of a ring in a tree control?

    Ok, this is probably a stupid question, but how does one get the position of a ring inside of a tree control?  I have a tree with two columns, with rings in the second column.  I can set the position using SetTreeCellRingValueFromIndex(), but how does one get the position after the user has modified the control?  I found the functions GetTreeCellRingIndexFromValue() and GetTreeCellRingValueFromIndex() but I haven't found a way to get either the Index or the Value of the ring (what I'm looking for is the index, but if I can obtain the value I can go from there).  Thanks in advance!
    Solved!
    Go to Solution.

    Hi,
    You can use GetTableCellVal function to get the value of the ring.
    There is not special "ring" function for that. Maybe that's what you were searching for
    From the value you can get to the index using the functions you are already aware of.
    Hope this helps,
    S. Eren BALCI
    www.aselsan.com.tr

  • How do I get the tag of a selected line in a tree control ?

    I am running LabVIEW 7.1.
    I want to be able to add a parent or sibling to a tree to a selected item in a tree.

    The tag of the selected item is actually the output of the tree control itself. If you create an indicator from the tree control, you will get a duplicate tree control (indicator), but if you wire the output into a string indicator, the tag of the selected item will show up. You can an item to the tree by wiring the tree reference into an invoke node, calling the method "Edit Tree Items: Add Item", and wiring the output of the tree control (which will be the tag of the selected item) into the "Parent Tag" terminal. This method will only let you add a child to an item, you cannot add a parent or sibling. Items cannot have multiple parents, so it wouldn't make sense to add a parent; and to add a sibling for the selected item, you could call the method "Navigate Tree: Get Parent" and pass the tag of the parent into the "Edit Tree Items: Add Item" method.
    Robert Mortensen
    Software Engineer
    National Instruments

  • Position Cursor on GRAPH either by dragging it OR entering the dsired position in the Cursor legend

    I've written a VI that allows the user to import a dataset, view it on a graph, and then use cursors to "filter" the range of data that I'm interested in, by sending the cursor.index values from the first graph to an array subset function which feeds a second graph.  The problem is that I'd like to provide the user the ability to position the cursors on the first graph both visually - by dragging - (for "course" control) AND by entering the desired values directly into the cursor legend (for fine control).  The problem is that I cannot find a way to do this, since I have to have the Lock Ring set to “Lock to Plot” in order to capture the index information. According to the documentation, the only way to be able to position the cursors via the Cursor legend is to set the Lock Ring to “Free”, which means the index values are rendered useless, since the cursor is no longer locked to the plot.  If I leave the Lock Ring in "Lock to Plot", and enter a value in the cursor legend, it does move the cursor, but not to where it should.  If I enter a value an x value of 9.0 for cursor 1, the cursor goes to 10.2638.  The next time I enter 9.0, it goes to 9.82794.  I don't understand what the issue is.  Is there a way around this?
    Attachments:
    ppv data filter 3.vi ‏366 KB

    Yes Rudi:  What I want is for the operator to place the cursors by dragging them (just eye-balling it).  The, if they see that the Y cursor (horizontal) is at 10.234, and they want to make it 10, they could simply enter that value in the cursor legend, and the cursor would be placed exactly at 10.  The only way to do this seems to be to select the “Free” option for the cursor.  However, in order to use the first graph to set the boundaries of the second graph, I have to use the Cursor Index from the first as an input to the Array Subset that feeds the second graph.  In order to use the Cursor Index, the first graph has to have its cursor Lock Rings set to “Lock to Plot”.  Am I making this any more understandable, or just rambling?

  • Cursor legend for waveform chart

    Greetings again. Is there a method to turn on the cursor legend in a waveform chart (like in the waveform graphs)? I'd like to allow a user of my application to be able to select a portion of a chart and have the application report the value plotted.
    I am acquiring data via the Analog In channels of a PCI-6036e at 1500 Hz to plot in real-time. I tried plotting my data with the waveform graph but it only shows the latest readings and does not scroll the data. I know I could build an array and rotate through it as the data comes in but that seems like a lot more effort just to be able to use the cursor controls to highlight data.
    Any ideas? Am I being too brief?
    Thanks-
    -dennis.

    Cursors are only avalaible on graphs, not charts. There was a post on this subject yesterday...
    See http://forums.ni.com/ni/board/message?board.id=170​&message.id=102968&jump=true
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • How to search a tree control.

    Hi all,
    I just started learning Flash Builder not too long ago, quite a learning experience I have to say. I am a little lost and woul like some help from you guys.
    I am trying to build a menu tree that will display and image and information about that image when the corresponding node is selected.
    I also want to have the menu tree searchable, I looked at a few examples of tree controls to get some ideas but I keep hitting brickwalls left and right.
    I started over few times trying to follow some of the examples. Right now, I only have the visual elements, please see the code below.
    Thank you so much in advance.
    Here's the code I have so far:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="960" minHeight="560" backgroundColor="#FFFFFF" width="960" height="560">
    <fx:Declarations>
    </fx:Declarations>
    <mx:HDividedBox y="80" height="415" x="25">
         <s:Panel x="20" y="95" width="240" height="415">
              <s:TextInput x="10" y="-25" height="20" contentBackgroundAlpha="1.0" borderAlpha="1.0" textAlign="left" fontWeight="normal" text="Search" focusColor="#70B2EE" fontSize="10" color="#646464"/>
              <mx:Tree id="tree"
                        x="10" y="5" width="220" height="370" borderVisible="false" color="#787878">
              </mx:Tree>
              <s:Button x="160" y="-25" label="Find" fontWeight="bold" fontSize="10"/>
         </s:Panel>
         <s:Panel x="275" y="95" width="660" height="415">
              <mx:SWFLoader id="swfLoader"
                               scaleContent="true"
                   x="0" y="0" width="660" height="190"/>
              <mx:Text width="639" id="treeSelectedData"
                         height="169" x="9" y="203"/>
         </s:Panel>
    </mx:HDividedBox>
    </mx:Application>

    You should take a look at the help documentation about the tree component. They have an example code at the bottom that shows how to load in data to the tree and how to perform actions when a node in the tree is selected. Below is a link to the help documentation on the tree component.
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/Tree.html?f ilter_flex=4.5.1&filter_flashplayer=10.3&filter_air=2.6

  • Array of Tree Control

    Hi,
    I have a tree control which I am using to display a test sequence.   I would like to put the tree controls in an array to display multiple (different) sequences.  I am having problems populating the controls.  When I get the reference, it populates all the controls in the array, rather than just one element.  
    Is there a way to populate just a single element in the array?
    Thanks
    John 
    Solved!
    Go to Solution.

    The only thing that can be different in an array is the value of the elements. All elements will share the same properties. In the case of a tree control the value is the item that's selected. The actual items is a property and hence every element would display the same items. If you need to have multiple tree controls then you would need to use a cluster, or just have multiple tree controls.

  • Qucik Graph Cursor Legend Questions

    Hi all,
    I have a couple of quick questions regarding my graph cursor legend:
    1. Is it possible to move the position of the cursor legend during runtime? I cannot seem to drag it around the graph?
    2. Can I hide/remove the cursor mover? This is not needed and is for this vi as I need to be able to manually drag the cursors only.
    I am accessing the cursor legend during runtime through a right-click and selecting "visable items:.
    Thanks,
    Jack

    Hi please check Using Cursor Legend in this link if it is helpful
    http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/customizing_graphs_and_charts/
    Sorry i don't know exact answer for questions, But did you try property node of Cursor.
    -To access it, right click the graph indicator in Black Diagram and go to create>>Property Node>>Cursor.
    -Lot of options regarding cursor available there, you can make selected property to write or change the parameter. and check this for help on cursor properties
    http://zone.ni.com/reference/en-XX/help/371361J-01/lvprop/cursor_p/
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13

  • Obtain a reference to the element at lead selection

    I am trying to obtain a reference to the element at lead selection of a context node (Node name is Person) of component controller, i had a method initPerson() to initialize the values, so when i am writting
    IPersonElement personEl = wdContext.nodePerson().currentPersonElement();
    to obtain a reference , at IPersonElement  it is giving me an error
    IPersonElement can not be ressolved or is not a type !
    can anyone help me on this
    Thanks in advance.
    Rashmi.
    Edited by: Rashmi Gupta on Nov 6, 2008 11:40 AM
    Edited by: Rashmi Gupta on Nov 6, 2008 11:41 AM

    Hi
    Usse
    view/controllerName.IPersonElement
    Just like given example below
    IPublicAllInOne.IFlight_List_1Element ELE = wdContext.nodeFlight_List_1().createFlight_List_1Element(new Bapisfldat());
    PS: Orgine the import files. by pressing control+Spece button at time
    or
    controlSpeceO
    Thanks

  • Obtaining activex reference from activex container

    I have a VI with an embedded MediaPlayer activex object inside an activex container.  Additionally, I have a seperately run VI which I want to be able to control the MediaPlayer obejct in the first VI.  These VIs are opened seperately, so I cannot pass information directly from one to another (i.e., I can't directly pass the MediaPlayer activex reference to the second VI directly).  Therefore, the second VI obtains a reference to the activex container object by searching the first VI's controls and filtering by label.  I can typecast the control reference to the level of activex container, but from there I have no way of obtaining a reference to the object embedded in it.  Is there are way to do this?  The "To more specific class" function does not accept activex references for typecasting, and the automation open does not accept activex container references.  I've searched through the forums, and while there is plenty on activex references and containers, there doesn't seem to be anything that addresses my issue.

    I'm not 100% about whether this will work, but give it a try. Once you have a reference to the container, use the 'Value' property. This will give you a variant. From here you can use Variant to Data, connect a MediaPlayer constant reference to the type input and you should get the correct reference out.
    Also, you could simply get a reference to the VI with the ActiveX control and use the method 'Control Value: Get[Variant]' to get the value of the control instead of getting a list of all the controls and searching for the one you want.

Maybe you are looking for