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

Similar Messages

  • Get All Control Values [Variant] Method for Global Vars

    Hello,
    to get all the data of controls use in a VI, the methode "Get All Control Values [Variant]" can be used fine.
    Is anything else available for gloabl variables which are use by this VI?
    Thanks.

    Yes, I tried to link this methode to the vi which contains the global vars but got the error message
    "you cannot make a strict vi refernce to a global VIs.
    Any other idea?
    Thanks, Thomas.
    Message Edited by maximint on 05-30-2007 08:41 AM
    Attachments:
    Untitled.vi ‏40 KB

  • How to get any control reference?

    Hi everyone,
    I want to get any control's reference when click the mouse button on any control.(Front Panel includes hundreds of different types of control.) Actually, I found method using "register for event:mouse down value source". This solution is fine working.
    But I don't want to use this method. Please Can you suggest any other method ?
    Thanks for answer...
    Himmet GENCER
    Software Development Coordinator at Teknik Destek Grubu
    [email protected]
    Attachments:
    getControlReference.vi ‏12 KB

    Using a couple of property nodes, you can get an array of references for all of the controls on a front panel.  From there, just register the array.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    All Controls Mouse Down.png ‏8 KB

  • Get FrontPanel Control references via ActiveX

    Hi,
    I've tried to get references to frontpanel controls via LabVIEW ActiveX server, equivalent to this LabVIEW code:
    but I cant find the ActiveX methods / propertis to use.   Is there a way to do this?
    /LeifS
    Solved!
    Go to Solution.

    The ActiveX Automation Server interface to the LabVIEW VI server only exposes a very small subset to the actual LabVIEW VI server. Basically it is enough to load and execute particular VIs and pass values to front panel controls by their label name, but that is it.
    The reason is twofold. When VI Server was introduced in LabVIEW around LabVIEW 5.0 this was mostly the functionality that VI server exposed altogether. There was no scripting at all, and only limited access to the object hierarchy of the frontpanel controls. Even then the ActiveX interface did not expose all methds and properties of the VI server, partly because exposure of LabVIEW internas would have required an extensive ActiveX typelibrary, partly because it was not considered a main concern to be able to do more than launching VIs through it. It was better than the DDE interface already by a long stretch.
    VI server was then extended enormously in later releases, but the ActiveX interface was not really changed much, also because Microsoft had announced .Net and declared the ActiveX hype of a few years earlier to be deprecated anyways.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • 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

  • How can I get a reference to all controls on a front panel of one type )for example of the type Text Ring?

    I'd like to set the strings[] property of all the Text Ring controls on a front panel at once without creating a property node for every text ring. How can i do that?

    > How can I get a reference to all controls on a front panel of one type
    > )for example of the type Text Ring?
    >
    > I'd like to set the strings[] property of all the Text Ring controls
    > on a front panel at once without creating a property node for every
    > text ring. How can i do that?
    This is likely more complicated than making property nodes for each
    ring, but you can do it. Make a subVI that takes in a panel reference,
    reads the array of control references, loops through them looking for
    rings, and modifying the Strings[] property on each ring.
    The part of this that will probably be the least obvious, when you
    have an array of control references there are two ways to find out
    if an element is a ring. You can read the classID and compare it
    to the cla
    ssID of a true ring control. An alternative is to cast
    the control reference to a ring control using a Cast to more specific
    node and wire the error out to a case structure. The error case is
    where the objects that aren't rings will go. The success case case
    where you will have a valid ring refnum that you can use to modify
    the strings.
    Greg McKaskle

  • 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

  • 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 all oneorder header_guids for a specific reference PRODUCT_ID?

    Hi,
    in servicerequest we add iobjects as reference objects.
    The iobject represents the machine a customer has an issue with.
    Within the iobject master we have a PRODUCT_ID. The product_ID represents the machine type.
    So:
    1 product_id could have 1:n iobjects (machines)
    1 servicerequest has 1:1 iobject.
    The requirement is to select all oneorder documents with a specific product_id within the assigned iobject.
    I do not realy know which database tables i have to join?
    Or is there already a function module in standard which can be used?
    Thank you
    Kind regards
    Manfred

    Hi,
    OBJECT_ID can´t be the import parameter for IOBJECTs because it is from type CRMT_OBJECT_ID - which is the ID of transactions and not IOBJECTs.
    I have played arround with this function module CRM_SERVICE_PORTAL_SEARCH but haven´t found an option to get all servicerequests (one order documents) for a specific reference object or a list of reference objects.
    Are there other ideas how to use this or another function module for my requirement.
    Thanks a lot.
    Kind regards
    Manfred

  • How to get all items under a parent item in a tree control

    Hello,
    I have 2 questions regarding a tree control:
    1) Is there any way to specify a parent item tag and get an array of ALL its sub item tags? For example, in the attached vi, specify the Parent#2 parent tag and get an array containing Item#P21 and Item#P22
    2) Is there a way to specify a range to the ActiveCell property. For example, all items from line#1 to line number#3
    Any ideas?
    Attachments:
    Tree example.vi ‏6 KB

    Mentos wrote:
    1) Is there any way to specify a parent item tag and get an array of ALL its sub item tags? For example, in the attached vi, specify the Parent#2 parent tag and get an array containing Item#P21 and Item#P22
     Did you try a search? There's no direct way of doing this. You have to navigate the tree and build up an array. You can find an example here: http://forums.ni.com/t5/LabVIEW/get-all-children-o​f-a-parent-in-tree/td-p/729548
    2) Is there a way to specify a range to the ActiveCell property. For example, all items from line#1 to line number#3
    No. (It's called ActiveCell, not ActiveCells) Presumably you are trying to perform an operation on multiple items. Unfortunately, you need to use a loop. You should defer panel updates if you're doing this a lot.

  • I got locked out of Mac os 9 and now I can't get into OS 9 or OS X.  All I see is the Macintosh SE and a finder face and text that says "mac os 9.2 welcome to mac os".  I can't get into COntrol Panel to reset the password to allow me to get in.

    I got locked out of Mac os 9 and now I can't get into OS 9 or OS X.  All I see is the Macintosh SE and a finder face and text that says "mac os 9.2 welcome to mac os".  I can't get into COntrol Panel to reset the password to allow me to get in.

    Do you have OS X and OS 9 installed on your Mac? If so, startup with the Option key depressed. This will open the Startup Manager window. Select the OS you want to start from & click the right arrow.
     Cheers, Tom

  • How to get the menu reference of a control while runtime

    Hello...
    i want to disable the control's short-cut menu programmatically. i could do it by using the event structure and 'shortcut menu activation' event.
    this is why i am asking about getting the menu reference if individual control.
    is there any other way out without using event structure?

    "Share_Good" <[email protected]> wrote in message
    news:[email protected]..
    > Hello...&nbsp;i want to disable the control's short-cut menu
    programmatically. i could do it by using the event structure and 'shortcut
    menu activation' event.&nbsp;this is why i am asking about getting the menu
    reference if individual control. &nbsp;is there any other way out without
    using event structure?&nbsp;&nbsp;
    No. You have to use the event. But if you simply disgard the activation, you
    don't need to change it's run time menu. You'll need the event structure
    anyway to catch the selected menu item.
    Regards,
    Wiebe.

  • 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

  • Data acquisition with control references

    I'm a new LabView user and I would like to acquire data in a subVI and display that data in the main VI. I think that I need to use control references and refnums, but I just haven't been able to figure it out. I would GREATLY appreciate any help I could get.
    Thank you!

    From your description I would guess that the "subVI" has a loop in it that repeatedly reads the FP hardware, and the indicator is inside the loop. Right?
    The thing to do is move a lot of the logic in the subVI up to the Main VI--or add the Main's added logic to the subVI, whichever is easier. In the first case, the subVI would go away, in the second, the subVI would become the Main VI.
    If you're confused, post your code in V6.0 format and I'll show you what I mean.
    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

  • Cluster of control references: want to access the control value

    I want to be able to save and set control values that are saved (XML). I have my controls on about 5 sub vi's. So I thought it'd be a good idea
    to put all the control references in a cluster from the several sub vi's and save and read from one point.
    I can get the cluster values (i.e. the references to the controls), but how to proceed from here? If somebody has a better idea it is very welcome.
    I have also read Ben's nugget here, but it deals with references to controls in a cluster, not references to a reference of a control in a cluster

    Thank you for reading that Nugget!
    I use a GUI Controller in many apps so I can grab refs in sub-VI's.
    Here are some screen shots of them in use.
    The first "GUI Cnt" is a wrapper around the AE and invokes the action "Set Analysis mode" then another call let me get a cluster of the refs so I can choose based on the name.
    This image shows what that action does.
    THis is what happens when going into collection mode.
    That is a small set of what you will find in my image gallery Feel free to browse (yes I know there is a lot of Olivia in there ) and ask if anything catches your interest.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for