Get Control Reference From Connector Pane

I am trying to get a reference to a control associated with a specific index on the connector pane. I see that there is a method to assign a control to a terminal but not get control from a specific terminal. I know I can list all controls on the connector pane, but this doesn't tell me specifically where they are.
Edit: I see there are private methods for getting and setting properties which may have this info, but because these are undocumented and they are properties of a VI which is binary, I can't reverse engineer.
CLA, LabVIEW Versions 2010-2013
Solved!
Go to Solution.

GregFreeman wrote:
The disconnect I had was that the array of controls that the connector pane property node will return has null refnums for unwired terminals, but there are still references for every terminal on the pane.
For learning about the terminals on an object, a good tactic is to drop the object on a diagram and select Visible Items > Terminals:
If you see completely enclosed terminal rects (like in the subVI terminals), then reading the "Terminals[]" property of the object will return all of them, even the null data type ones. So for the subVI, you can see that there are 12 distinct terminal rects, so that's how many terminals the object has. But on the built-in function, there are only 6 enclosed terminal rects. So reading the "Terminals[]" property on the subVI will return 12 items, and reading it on the function will return 6.
Jacobson wrote:
Good find on the example VI...
I wrote it (along with about 400 other VIs in the examples folder), so it was pretty easy to find.
Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman

Similar Messages

  • 'Control terminals on connector pane not on top level block diagram.' comment on CLD report

    Hello All
    Could anybody enlighten me please , what does that comment mean on CLD report
    'Control terminals on connector pane not on top level block diagram.
    Does it mean that some terminals are hidden within some case structures and not showing on block diagram without going into case structures or by 'top level block diagram' it means
    main.vi and controls on main.vi must also be connected to its connector pane?
    Thank you
    K.Waris
    Solved!
    Go to Solution.

    For one thing it means that they run VI analyzer on your VIs since that is a verbatim warning that you receive.  It simply means a terminal which is wired to the ConPane is not on the top level diagram, ie. inside a case structure.
    As to why it is often not a good idea to do this read this classic thread:
    http://forums.ni.com/t5/LabVIEW/case-structure-parameter-efficiency/m-p/382516#M191622

  • Why do i get an empty output if i connect a control to the connector pane ?

    hello everyone..
    i must admit the behaviour of the following program somewhat blew my mind and made me doubt whether i had ever understood anything about programming in labview.
    please have a look at the attached vi and it's subvi. i probe the output of debug.vi (result path) two times. once when it is connected as an indicator on the connector pane and once when it is not. then i run test.vi.
    the prize question:
    why don't i get identical values?
    in the case "result path" is connected i get an empty path at some point. in the case "result path" is not connected i always get a value, something i thought should always be the case. what is happening?
    Attachments:
    test.vi ‏8 KB
    debug.vi ‏9 KB
    StateMachineStates.ctl ‏5 KB

    There are a lot of questionable conde constructs that make very little sense.
    Where do you actually probe the output (the subVI does not seem have any output connectors assigned)
    Are the indicators big enough to avoid wrapping?
    Why is the browse option set to "existing files", however, you are building a path from it. This will invariably give you an illegal path.
    Instead of all these local variables, use a single feedback node.
    Please provide an exact step-by-step procedure on what we should do to reproduce your observations. How can you possibly get a value in an indicator if it is not connected to anything? 
    LabVIEW Champion . Do more with less code and in less time .

  • Accesing controls (references) from several VI's

    Ok I have this small problem:
    I have a large program
    and have put serveral "advanced settings" in a different VI.
    Result
    is that the values entered here need to be passed to controls in
    different other VI's
    The way I use this now is using 1 element
    queues to pass the control
    value. 
    For one VI I can create control
    references, call a sub vi and put here the control that can manipulate
    the value.
    How do I achieve this for multiple VI's? Is
    there a way to make control values from ANY running VI available? Maybe
    using xcontrols? I have no idea how to achieve this though.
    thanks!

    Ben wrote:
    I will typically use a GUI controller in my apps to accomplish that type of thing.
    GUI Controller
    I develop an Action Engine  that will cache a cluster of control references when an Init method is invoked. This put all references in a SR that can be accessed from any place the Ae is used.
    I add methods to the AE to take care of screen settings associated with changes of state ("Set Visability Edit Mode", "Set Visablilty Login", etc).
    I also add a method to return the cluster of refs so I can use them to set-up dynamic event registration in sub-VI etc.
    A side benfit of using a GUI Controller is that you have a single point where you can add a "stack" of screen views so functions like "Back" and "Forward" can be added easily. 
    So...
    trying using a GUI Controller.
    Ben
    This an excellent method for achieving what you want. A variation of it would be to use LVOOP instead of the AE. The two approachs are essentially the same but with some thought on the definition of the classes I imagine you can create a general purpose base class to handle most of the common aspects. Customizations can be achieved using derived classes.
    Further adding to Jeff's comments about the up front hit in the schedule. When done right you will see the benefits of shorter schedules for future projects. The first time is the hardest sell to management. However once you get a couple of successes under your belt future requests will be much easier since you now have a track record of benefits achieved by using reusable code libraries.
    Message Edited by Mark Yedinak on 03-30-2010 08:55 AM
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Getting control references which are in tabs

    Hello,
    In a labview vi, we can successfully get all the control references, including references to tab controls.  We would also like to get at the control references of controls which are contained within the tabs.  We've been hunting around the methods/properties of the vi pane references (where we found the controls[]) reference, and can't seem to find how to access the control references within tabs.  Does anyone know the method/property to do this?
    Thanks
    David Jenkinson

    The Pages property will return a 1D array of references to each page. Then you can autoindex this to get the controls for each page reference:

  • How to get first Reference from a Mail header?

    One of the fields that may appear in an email message header is "References." I need to get the first item (which is a Message ID) in that field. However, when I try the following script for a message that has one or more IDs in References:
    <pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:800px">using terms from application "Mail"
    on perform mail action with messages theMessages
    repeat with eachMessage in theMessages
    set theFirstRef to item 1 of content of header "References" of eachMessage</pre>
    I get: "Mail got an error: Can’t make item 1 of content of header \"References\" of message id 17946 of mailbox \"INBOX\" of account \"David\" into type reference."
    If I omit "item 1 of", I get the complete References field. So I've tried:
    <pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:800px"> set theRefs to content of header "References" of eachMessage
    set theFirstRef to item 1 of theRefs</pre>
    but that only gets me the first character (or subsequent characters if I use a value > 1), which is an open-angle. (BTW, I don't understand why breaking the action into 2 steps like this doesn't produce the same error as the first example.) I've also tried:
    <pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:800px"> set theRefs to (content of header "References" of eachMessage)
    set theFirstRef to word 2 of theRefs</pre>
    This skips the first open-angle in the References field and gets me all of the string up to the first delimiter. Unfortunately, the number of delimiters that may appear in a Message ID varies, so I can't simply grab a predetermined set and concatenate them. Furthermore, that would remove the delimiters, so the resulting Message ID in theFirstRef would be incorrect.
    I need a syntax that gets me everything between the first set of open- and close-angles but haven't been able to determine what that is.

    Thanks to your pointer, I found "text item delimiters" discussed on pp. 39-40 of the AppleScript Language Guide. A typical References field on my system for the last message in a somewhat long thread looks like this:
    <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]>
    So the message IDs are delimited by spaces and by open- and close-angles. Thus, if I use:
    <pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:800px"> set {savedDelims, my text item delimiters} to {my text item delimiters, " "}
    repeat with eachMessage in theMessages
    set theRefs to content of header "References" of eachMessage
    set theFirstRef to text item 1 of theRefs</pre>
    as you suggested, I get "<[email protected]>". That's close to what I want but includes the open and close angles in the returned string. If, however, I specify <pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:30px">"<> "</pre> as the delimiters, I get the entire field, i.e., no parsing occurs. I've tried variations and found, for example, that <pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:20px">"> "</pre>returns the first string without the close angle, whereas <pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:20px">" >"</pre>(i.e., using the opposite order) returns the entire field -- don't understand why the order matters -- but haven't found the magic.
    I know < and > are AppleScript operators (what's more, I've had to take special steps to show the quoted strings properly here) and am wondering whether they're a special case. I've tried using backslash, but that didn't help, either.

  • How get controls name from a class private data?

    How can i get the names of the controls inside a class private data?
    I am using Actor Framework and trying to create a method tha will be executed when launch the actor. This method need a list o all the control names inside the class data to search for the initial value inside a configuration file (config.ini), the key on the configuration file will be the name of the control.
    Thanks.
    Solved!
    Go to Solution.

    You are already making the overriding method just because you have to write to the Bundle By Name.  And then how are you going to handle all of the data types the keys could be.  You are making things more difficult than it should be for really very little benefit.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • WPF UI running in seperate runspace - able to set/get controls via synchronized hash table, but referencing the control via the hash table from within an event handler causes both runspaces to hang.

    I am trying to build a proof of concept where a WPF form is hosted in a seperate runspace and updates are handled from the primary shell/runspace. I have had some success thanks to a great article by Boe Prox, but I am having an issue I wanted to open up
    to see if anyone had a suggestion.
    My goals are as follows:
    1.) Set control properties from the primary runspace (Completed)
    2.) Get control properties from the primary runspace (Completed)
    3.) Respond to WPF form events in the UI runspace from the primary runspace (Kind of broken).
    I have the ability to read/write values to the form, but I am having difficulty with events. Specifically, I can fire and handle events, but the minute I try to reference the $SyncHash from within the event it appears to cause a blocking condition hanging both
    runspaces. As a result, I am unable to update the form based on an event being fired by a control.
    In the example below, the form is loaded and the following steps occur:
    1.) Update-Combobox is called and it populates the combobox with a list of service names and selects the first item.
    2.) update-textbox is called and sets the Text property of the textbox.
    3.) The Text value of the textbox is read by the function read-textbox and output using write-host.
    4.) An event handle is registered for the SelectionChanged event for the combobox to call the update-textbox function used earlier.
    5.) If you change the selection on the combobox, the shell and UI hangs as soon as $SyncHash is referenced. I suspect this is causing some sort of blocking condition from multiple threads trying to access the synchronized nature of the hash table, but I am
    unsure as to why / how to work around it. If you comment out the line "$SyncHash.TXT_Output.Dispatcher.Invoke("Send",[action]{$SyncHash.TXT_Output.Text = $Value})" within update-textbox the event handler will execute/complete.
    $UI_JobScript =
    try{
    Function New-Form ([XML]$XAML_Form){
    $XML_Node_Reader=(New-Object System.Xml.XmlNodeReader $XAML_Form)
    [Windows.Markup.XamlReader]::Load($XML_Node_Reader)
    try{
    Add-Type –AssemblyName PresentationFramework
    Add-Type –AssemblyName PresentationCore
    Add-Type –AssemblyName WindowsBase
    catch{
    Throw "Unable to load the requisite Windows Presentation Foundation assemblies. Please verify that the .NET Framework 3.5 Service Pack 1 or later is installed on this system."
    $Form = New-Form -XAML_Form $SyncHash.XAML_Form
    $SyncHash.Form = $Form
    $SyncHash.CMB_Services = $SyncHash.Form.FindName("CMB_Services")
    $SyncHash.TXT_Output = $SyncHash.Form.FindName("TXT_Output")
    $SyncHash.Form.ShowDialog() | Out-Null
    $SyncHash.Error = $Error
    catch{
    write-host $_.Exception.Message
    #End UI_JobScript
    #Begin Main
    add-type -AssemblyName WindowsBase
    [XML]$XAML_Form = @"
    <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Window.Resources>
    <DataTemplate x:Key="DTMPL_Name">
    <TextBlock Text="{Binding Path=Name}" />
    </DataTemplate>
    </Window.Resources>
    <DockPanel LastChildFill="True">
    <StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
    <Label Name="LBL_Services" Content="Services:" />
    <ComboBox Name="CMB_Services" ItemTemplate="{StaticResource DTMPL_Name}"/>
    </StackPanel>
    <TextBox Name="TXT_Output"/>
    </DockPanel>
    </Window>
    $SyncHash = [hashtable]::Synchronized(@{})
    $SyncHash.Add("XAML_Form",$XAML_Form)
    $SyncHash.Add("InitialScript", $InitialScript)
    $Normal = [System.Windows.Threading.DispatcherPriority]::Normal
    $UI_Runspace =[RunspaceFactory]::CreateRunspace()
    $UI_Runspace.ApartmentState = [System.Threading.ApartmentState]::STA
    $UI_Runspace.ThreadOptions = [System.Management.Automation.Runspaces.PSThreadOptions]::ReuseThread
    $UI_Runspace.Open()
    $UI_Runspace.SessionStateProxy.SetVariable("SyncHash",$SyncHash)
    $UI_Pipeline = [PowerShell]::Create()
    $UI_Pipeline.Runspace=$UI_Runspace
    $UI_Pipeline.AddScript($UI_JobScript) | out-Null
    $Job = $UI_Pipeline.BeginInvoke()
    $SyncHash.ServiceList = get-service | select name, status | Sort-Object -Property Name
    Function Update-Combobox{
    write-host "`nBegin Update-Combobox [$(get-date)]"
    $SyncHash.CMB_Services.Dispatcher.Invoke($Normal,[action]{$SyncHash.CMB_Services.ItemsSource = $SyncHash.ServiceList})
    $SyncHash.CMB_Services.Dispatcher.Invoke($Normal,[action]{$SyncHash.CMB_Services.SelectedIndex = 0})
    write-host "`End Update-Combobox [$(get-date)]"
    Function Update-Textbox([string]$Value){
    write-host "`nBegin Update-Textbox [$(get-date)]"
    $SyncHash.TXT_Output.Dispatcher.Invoke("Send",[action]{$SyncHash.TXT_Output.Text = $Value})
    write-host "End Update-Textbox [$(get-date)]"
    Function Read-Textbox(){
    write-host "`nBegin Read-Textbox [$(get-date)]"
    $SyncHash.TXT_Output.Dispatcher.Invoke($Normal,[action]{$Global:Return = $SyncHash.TXT_Output.Text})
    $Global:Return
    remove-variable -Name Return -scope Global
    write-host "End Read-Textbox [$(get-date)]"
    #Give the form some time to load in the other runspace
    $MaxWaitCycles = 5
    while (($SyncHash.Form.IsInitialized -eq $Null)-and ($MaxWaitCycles -gt 0)){
    Start-Sleep -Milliseconds 200
    $MaxWaitCycles--
    Update-ComboBox
    Update-Textbox -Value $("Initial Load: $(get-date)")
    Write-Host "Value Read From Textbox: $(Read-TextBox)"
    Register-ObjectEvent -InputObject $SyncHash.CMB_Services -EventName SelectionChanged -SourceIdentifier "CMB_Services.SelectionChanged" -action {Update-Textbox -Value $("From Selection Changed Event: $(get-date)")}

    Thanks again for the responses. This may not be possible, but I thought I would throw it out there. I appreciate your help in looking into this.
    To clarify the "Respond to control events in the main runspace"... I'm would like to have an event generated by a form object in the UI runspace (ex: combo box selectionchanged event) trigger a delegate within the main runspace and have that delegate in
    the main runspace update the form in the UI runspace.
    ex:
    1.) User changes selection on combo box generating form event
    2.) Event calls delegate (which I have gotten to work)
    3.) Delegate does some basic processing (works)
    4.) Delegate attempts to update form in UI runspace (hangs)
    As to the delegates / which runspace they are running in. I see the $synchash variable if I run get-var within a delegate, but I do not see the $Form variable so I am assuming that they are in the main runspace. Do you agree with that assumption?

  • Help!: Control reference seamingly "lost" in run-time execution mode

    Hi!
    The Facts:
    LabView 6.1 PC under NT.
    I've been using "Vi loader" technique since a few month s to distribute a LabView application on severals PCs without having to re-compile it each time. My application uses more than 500 VIs so I can't build it directly. The directories/Vis of the application are simply copied on the target PC and run through the Vi loader technique instead of using the development environnement.
    The problem:
    Since the last release of the my application, differences between the application running in development mode or run-time mode have appeared:
    One VI reading a .ini file does not act the same way if runned in the developpment environnment or
    runned in the run-time environnment. This VI uses control-references from its front-panel and passes them to sub vis. In run-time execution those references seems to be perverted: the sub-vis get them but can't access their properties like Label Name, Values,...
    All works perfectly fine if the VI is runned in the environnment developpment.
    Moreover the same sub-vis called with other control references in other VIs work fine.
    Question:
    Has anyone seen any behavioral difference between run-time execution and development environnement execution?
    Are there any differences in the linkage process between those 2 execution ways?
    Is there any labview Feature that would automaticaly "de-allocate" references at run time and would do so "too early"?
    Is there any know problem with poly-morphique VIS in run-time execution mode.
    That's all, any idea, lead, wellcome!

    Hi Andrew!
    I've allready had a look at the "Problem with VI Loader technique". It only deals with top vis not working (ie broken) when called from loader in Run-Time mode because of ill declared vi.lib path.
    It's "unfortunately" not my problem: My VI is not broken, it's kind'a working, but not as it does in development environment execution mode.
    If NI people are reading this, I would like to send them the VI and it sub-VIs to understand if something has been perverted .
    The problem is seen on all three target PCs.
    Moreover, a new one has appeared: in run-time mode, the standard "file dialog" vi called to prompt the user for a file with a given extension pattern sends back the file name with the extension "double dotted" (exemple: anything..data
    instead of anything.data).
    About the first problem, does any know why a Ctrl Refnum would loose its parent information (name, value...) in run-time execution mode?
    Bye!

  • Main VI stops when using control references.

    Hi, This is my first question on this forum. I've created an engine simulation VI which uses control references. The main VI has a data acquistion loop and control references. The control references link to another VI that runs an equation loop which continuously calculates engine speed base on data collected in the main VI. The control references work but the main VI data is collected and updated only once when the main VI starts. If I remove the control references from the main VI the daq loop runs fine. Thanks in advance for your help.
    Mike

    Joe,
    Thanks for the response. I do not load the subvi dynamically. I have attached a similar vi to show what I'm trying to accomplish. The DAQ vi reads the input and calculates the power. The power is sent to the "engine momentum sub" vi where the speed, as a function of time, is generated and sent back to the DAQ vi. I created the sub vi to clean up and isolate the DAQ vi from the subvi. I wanted the sub vi to run at a certain speed (by adjusting the wait time)and not affect the DAQ vi. If you input a value of 10 into the DAQ vi and then start it you will see the speed ramp up to 100. While the DAQ vi is running, I need to be able to change the input which would cause the power to change and in turn change the speed. I thought the control r
    eferences were the way to go. In my real DAQ vi, I have many more inputs, all which do not update after the first reading. I considered putting the DAQ functions in another subvi and reading the outputs through control references but that seemed too cumbersome.
    Thanks again,
    Mike
    Attachments:
    DAQ.vi ‏27 KB
    Engine_Momentum_Sub.vi ‏33 KB

  • How can i get the reference to Controls from VI-reference

    Hello,
    i have a VI with ~5 controls on it.
    And with the Object "Current VIs path" and "Open VI reference" i can create a reference to the current VI.
    How can i create now a reference to the controls? (Starting with VI-reference?
    Of course i know how to create directly a reference from a control.
    My idea wasm that there areperhaps properties like:
    - Number of controls
    - Name of control
    - Type of control (string, bool. number...)
    Is this somewhere there and i just dont find it?
    Thanks for your help

    Once you have the VI Refnum, it's a two-step process. Wire the VI Refnum into a property node and get a reference to the Front Panel. Output the Front Panel reference into another property node and select the property Controls[ ], which outputs an array of references for all the controls on the front panel.
    Message Edited by Jarrod S. on 04-20-2007 11:06 AM
    Jarrod S.
    National Instruments
    Attachments:
    get_ref.PNG ‏5 KB

  • How do I get connector pane names programatically with ActiveX?

    I am learning how to use LabVIEW's ActiveX automation to call LabVIEW VIs from Python. 
    The following code works as expected (the comments are a little too verbose, but they help):
    # Example: calling LabVIEW from Python
    # grab the LabVIEW ActiveX interface
    # generated with the Python COM Makepy utility
    import labview_pycom
    # grab a handle to the LabVIEW 8 application
    lv = labview_pycom.Application()
    # open up a VI -- path, password, reserve handle (t/f)
    vi = lv.GetVIReference(r"C:\Test VIs\Hex Adder.vi", "", True)
    # call the VI with named parameters and corresponding values
    # pass ALL parameters here -- input and output;
    # - output parameter values are don't cares
    # - will return names of all passed parameters and values
    returns = vi.Call(["String", "String 2", "Sum", "hex Sum"], ["1", "2", 0, ""])
    print returns
    My Hex Adder.vi takes two strings "String" and "String 2", parses them into integers, and adds them.  It outputs an integer, "Sum", and the sum as a string, "hex Sum".
    Output:
    ((u'String', u'String 2', u'Sum', u'hex Sum'), (u'1', u'2', 3, u'00000003'))
    I explicitly pass names of items on the connector pane in vi.call( ... ), and that's OK in this application.  I want to know, though, what names and values I could pass, without dissecting the connector pane in LabVIEW.
    Is it possible to ask LabVIEW, through a function call, the names of all the front panel controls or items on the connector pane?  The GetControlValue(...) and SetControlValue(...) take named parameters -- but I want a list of the names they can take.
    Thanks!
    Matthew Ploguh

    I am not sure if the ActiveX server exposes a method to get a VI's controls.
    Why don't you just write a VI that uses "Open VI Reference" and the VI server properties to enumerate the controls on the VI? You can then call this VI from python to get the parameters of the VI that you really want to call.
    Pramod
    Message Edited by PramodS on 02-14-2008 05:30 AM

  • How do get an indicator to appear when using control references

    Hi, can anyone help with the following?
    I've just managed to resolve the problem of getting indicators of a sub VI to appear on the front panel of my main VI and remain active. This was done by using control references. Basically, I created a reference for the control on the front panel of the main VI. I then dragged the reference in the block diagram of the main VI to the front panel of the subVI to obtain a Control Refnum. Then in the block diagram of the subVI I created a property node and linked the indicator and control refnum to it. Then I wired the subVI's connector pane to the control refnums in the subVi front panel. Finally, I copied the subVI icon into the mainVI block diagram
    and wired the references to the relevent renum terminals of the subVI connector pane. However, I'm still having a problem with one of the indicators, which I've called 'time limit reached?'. When the VI has reached the end of the run this indicator in the subVI changes from the word 'No' (surrounded by a red box) to 'Yes' (surrounded by a green box). In the sub VI this was done by using a comparison function and linking the visible property node to the 'time limit reached?' true/false boolean. I would like the same to happen on the front panel of my main VI. In this case where should I put my property node and control refnum? I'm unable to link a control refnum to the current visible property node. When I create a visible property node which can be joined to a control refnum then I don't have the option to link it to the true/false boolean. Any suggestions? I have written a small VI which demonstrates the problem if need be.
    Thanks, Adrian
    [email protected]

    I would suggest to use a customized boolean instead of making it visible/invisible, just take a boolean, change boolean text from TRUE/FALSE to YES/NO and change also diferent cases colors, this way, you don't need to play with property nodes. If this can't be done for any reason, using a local / global variable is the only solution that comes to my mind.
    Hope this helps

  • Get Specific References for all Controls

    Using slightly modified code from here, I am generating an array of all control references on my main front panel which is then passed through to a number of subVIs. Although this functionality does work, it would be preferable to get specific references to the controls (for example, Boolean RefNum instead of Control RefNum). 
    Getting these specific references seems possible using To More Specific Class and Class Specifier constants. However, data storage becomes an issue because I can no longer use arrays (as they are a different data type). I am not sure if there is another way to pass this data on. I have experimented casting the RefNums to Variants, but to get the data from the variant, I have to know what RefNum type I am expecting which sort of defeats the purpose of doing this in the first place.
    A secondary problem is keeping the names of the references. The Control RefNums do not have names associated with them nor do I know how to assign names to them. I've again tried using variants and using the OpenG Set Data Name function, but this crashes LabVIEW without any indication of why.
    I've attached a version of my code that tries assign names using OpenG Set Data Name and build a variant array. To run it, simple add the VI as a subVI to a VI that has some boolean controls on the Front Panel. Apologies for the rough state of the code - I'm still in the process of figuring out how to make it work so things are a bit messy.
    Solved!
    Go to Solution.
    Attachments:
    Get Specific Control Refs.vi ‏28 KB

    I don't know if you'll get much better.  There is really no way I know of to have some fully flexible way of building named clusters of references based on any given front panel set you feed to it.
    I tend to do things the manual way (as there are also a bunch of references to front panel elements I wouldn't need).  I would do all the bundling work in a subVI.
    I'm attaching a zip file that contains the key VI's (unless I missed something) on the first project where I really tried to abstract out the reference building.  The files are LV9.
    On my main VI, I have the subVI called Build UI References early in the VI during an initialization phase.  I pass the reference to the main VI into that subVI that builds all the references.  I worked it as a master cluster that contains elements that are arrays of references of related controls.  It uses another subVI called Get References and Label Names that I created to help find controls.  I still need to use More Specific Class to get the property references, but I don that only once at the beginning.  I then pass that cluster wire out and to anywhere in my VI that would need access to the references for front panel elements.
    I use arrays of strings to supply the names I need to build and bundle the references.  This lets me ignore controls I don't care about.  The disadvantages to my system is that if I change the name of any control, I need to update the name within this subVI.  And if I want to add any controls, not only do I need to add the label names for the searching functions, I also need to update my typedef cluster (and you definitely want this to be a typedef) to add a spot to store the new reference.
    I hope this gives you some ideas.  It worked for me and I will likely use the scheme on another project (or even rewrite past projects using this scheme.)  If there are any ideas for improvements, I'd be happy to hear them.
    Attachments:
    Build UI refs.zip ‏83 KB

  • Get All Controls References

    Hi all
    If somebody know how can i get all controls references of VI (including controls that founds in Tabs and Clusters). I need generic method, because i haven't information about VI (reference to VI i get only at run-time).
    Thanks, Nadav

    To include the controls on Tabs, pass the array from my previous answer into a for loop, use auto-indexing. Place a Class Specifier Constant in the loop, right click on it and set it's type to a Tab Control. Place a "To More Specific Class" function below the constant, and wire the constant into the top.
    If the control from the array that you pass in is a Tab Control, "To More Specific Class" will NOT return an error. Use a case statement and use the No Error case to expose the Tab Control properties. Return the "Pages" property (an array) and pass this into a for loop. Connect a property node to the indexed pages, then select Controls On Page to return an array of controls ON EACH PAGE. You need to set up a shift register and use build array to return all of the controls from all of the pages. Make sure you close the Page Reference.  You can concatenate the array of Tab Control Page items with your original FP Controls.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

Maybe you are looking for

  • Project management systemwho uses what?

    My dilemma: We are a small Design Marketing firm that uses a hodge-podge of different software systems to manage the various aspects of a project lifecycle. My wish: To find a single system that will: 1. Generate work estimates 2. Convert estimates t

  • Lighroom and Nikon NEF files

    I have some questions about Lightroom's handling of Nikon NEF files, specifically the parts of the NEF files that Nikon has decided it is a brilliant idea to encrypt. I am using a Nikon D200. How does Lightroom handle white balance in a NEF file? Has

  • WRT350N so problematic!

    I have a WRT350N With a whole lot of problems. I'm running 1.03.02 First the router won't ping, when I go into the diagnostics page under administration I enter an IP address and click ping, all it gives me is: PING 192.168.1.50 (192.168.1.50): 33 da

  • How to stop and start WMA in 11i system

    how to stop and start MWA in 11i system, its Linux server.

  • Unable to update credit card details.

    Hi all, My credit card was replaced and I need to update the details on my CC subscription. However, when I try accessing the 'Edit Payment Details' page on the web, I end up getting the following error page: Server Error Error: We are currently unab