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

Similar Messages

  • 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

  • How can I allow or block the use of local storage by specific sites for all users in my domain.

    How can I allow or block the use of local storage by specific sites for all users in my domain.
    I tried to do this by MMS.cfg but it is not working, the problem is also described in your blog "http://forums.adobe.com/message/3272907".
    What I Want -: "I want to allow youtube for all the users in my domain and this should be listed in Control panel-->flash player-->storage-->local storage setting by site-->websites tab."

    Wow, cor-el... Did you -intend- your reply to be inane, inappropriate and completely inapplicable?
    How would that possibly do what I asked?
    You -might- consider '''''reading''''' the question, -=before=- you reply. And it's really okay to NOT REPLY if you just don't know. Just an idea.
    Feel better, real soon.

  • In mdx how to get max date for all employees is it posible shall we use group by in mdx

    in mdx how to get max date for all employees is it posible shall we use group by in mdx
    example
    empno  ename date
    1         hari        12-01-1982
    1         hari        13-06-2000
    by using above data i want to get max data

    Hi Hari3109,
    According to your description, you want to get the max date for the employees, right?
    In your scenario, do you want to get the max date for all the employees or for each employee? In MDX, we have the Max function to achieve your requirement. You can refer to Naveen's link or the link below to see the details.
    http://www.sqldbpros.com/2013/08/get-the-max-date-from-a-cube-using-mdx/
    If this is not what you want, please provide us more information about the structure of you cube, so that we can make further analysis.
    Regards,
    Charlie Liao
    TechNet Community Support

  • TB 27.0.1 (W7) will not "get new messages for all accounts"

    I installed W7 with IE11and downloaded the latest TB (27.0.1) I have added five email accounts (more to be added) and none of them show up in the left pane - only global Inbox and two folders I created. I can get new messages manually one account at a time, but "get new messages for all accounts" (or Shift F5) does nothing. Most of this happed after MS installed well over 100 updates to my W7, but some of my accounts never did show up in the left pane even before the W7 updates. I have reinstalled TB - nothing changes.

    Matt, I thank you for your kind and gracious response (Ok I will say this only once....). Be assured that I would never think of asking your advice again.
    The crux of the matter has been resolved by checking the “Include this server when getting new mail” box in each account’s “Advanced” box under “Server Settings.” Now every time TB checks for new mail (including on startup), the process is displayed in the lower left portion of the window. I wish this had been explained to me more clearly early on.
    Having all accounts in the left pane has become unimportant now that I can see the mail being checked on startup, periodically, and on Shift F5.
    I consider this thread closed.

  • Get a result for all step by string

    I'm have to get a result for all step by a string , when the step is pass/fail , it return a 0/1,when the step return a real value, it return a real value,in totally all step run over, the string will be have this format : "0,1,1,...1,0.44,0.55,0.43,0"
    how to created this kind of sequence procedure ?
    thank you in advance...
    Alex

    Hi,
    You could do this as of the report generation (reportgen_txt|html.seq).
    what are you going to do with this string that you propose to generate?
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • In new iphone 5 very first call getting busy tone for all the numbers

    in new iphone 5 very first call getting busy tone for all the numbers.

    my son had this problem.  I went to the apple store and they wiped out and restored the phone..  They said that was all they could do but that I should call our phone carrier and ask them.  I did.  They asked if in the top left side, next to battery power there was a icon of a half moon.  There was. They said to go in to settings and go to "Do not Disturb" and turn it off.  I did.....problem solved!!! Somehow "do not disturb" was turned on and that is what happens if it is!!
    I hope this helps.

  • Set default for all controls

    How do I set a default for all controls?
    For example, I want the label to always appear on the left.  Instead of setting the control attribute for each LED separately, I'd rather set a default to be applied to all LEDs.
    I'd prefer to do this programmatically.
    Thanks!!!

    Hi,
    one possibility is to use the function call SetAttributeForCtrls from the programmer's toolbox library.
    Another, to generate the controls programmatically - if you are using your own functions to do so you can define the default as to your liking.
    Wolfgang

  • Getting Menu Reference for a VI other than the current one

    Is there any way to get a Menu reference for a VI that isn't the current VI? There's Current VI's Menubar, but that only works on the current VI. I'd like something that does the same thing, but accepts a VI reference to a higher-level VI. I would expect to find a Property Node entry for it, but there doesn't seem to be one. This is for 8.2.

    eaolson wrote:
    A functional global is what I wound up using. It just seems odd to me that there's no other way to get access to that reference.
    It also seems counter-intuitive to me that a Shortcut Menu reference is only valid inside that particular frame of the Event Structure that caught it. If you're using a producer-consumer architecture, you can not send that refnum off to the consumer loop for handling; it can only used within that frame of the Event Structure.
    I am not sure what you mean. The refnum seems to be accessible from everywhere .
    As i wrote above:
    You can store the Menu Reference to a global variable for example, and you can read it, in any vi you want, just like all variables.
    Note: Do not try to use a property note. Use the menu functions

  • How to get a reference for custom controller

    Hi All,
         I am working with the custom controller but i dont know how to call the functionality of custom controller into a view controller.For accessing component controller functionality we have a attribute wd_comp_controller in view controller.Like this how to get a refernce for the custom controller.
    Thanks in Advance.

    hi,
    Lets say view1 has the event ONACTIONNAVIGATE and you want to call a method 'start_navigation' in the custom controller named 'navigation'.
    Use the following code.
    METHOD onactionnavigate .
    DATA lo_navigation_controller TYPE REF TO ig_navigation.
    lo_navigation_controller = wd_this->get_navigation_ctr( ).
    CASE navigation_type.
    WHEN 'BACKWARD'.
    lo_navigation_controller->start_navigation( if_fitv_fpm_api=>gc_navigate_backward ).
    WHEN 'FORWARD'.
    lo_navigation_controller->start_navigation( if_fitv_fpm_api=>gc_navigate_forward ).
    ENDCASE.
    ENDMETHOD.
    Thanks,
    Rajkumar.S

  • Problem in getting records using FOR ALL ENTRIES

    Hi All,
    I am bringing the employee details with required selection criteria into an internal master table IT_EMPDETAILS.
    Now, I would want to fill the other columns of this internal table, using FOR ALL ENTRIES as  below:
      SELECT ZRCODE FROM PA9001
      INTO CORRESPONDING FIELDS OF TABLE IT_EMPDETAILS
      FOR ALL ENTRIES IN IT_EMPDETAILS
      WHERE   PERNR = IT_EMPDETAILS-PERNR
          AND ENDDA = '99991231'.
    but while i use this, it is actually clearing the IT_EMPDETAILS instead of filling the column of IT_EMPDETAILS table.
    what could be going wrong??
    Thanks in advance,
    Mohan

    Dear All,
    Thanks for the amazing replies, yesterday's world cup match is really doing wonders i guess!
    To give more insight at what i am looking for and what is done so far:
    I tried creating another Internal table and then filled that with only PERNR.
    and then using that. tried to fill IT_EMPDETAILS internal table using for all entries,
    alas it did not work, and it did not work with APPENDING CORRESPONDING either.
    now, coming to using LOOP, if I use loop, I am going run the loop for 1lakh emp(approx..and going high everyday) and modify the internal table for 1lakh records. AND not only that, I am going to loop another 9 tables in similar manner. that is 9lakh loops AND thats not all,
    after that I have to again loop the master internal table to loop and fill other employee details like 'text' instead of 'code' from a master table.
    This is one of the most query intensive, realtime, online comprehensive employee report that i am making.
    Appreciate replies from ABAP performance tuning experts and gurus in advance.
    Cheers,
    Mohan

  • Why didn't I get a receipt for all the purchased apps

    I got receipts for all the purchased music on iTunes but not the App Store.

    Hi jesus171996,
    The article below will show you how to review your account and report any issues to the iTunes Store.
    iTunes Store & Mac App Store: Seeing your purchase history and order numbers
    http://support.apple.com/kb/ht2727
    Cheers,
    Judy

  • Can I get the reference to all objects in JVM Heap?

    Hello,
    Thanx in advance for reading (and replying) to this problem.
    I need to find an object whose reference I dont have.
    I feel the best place to search for is the JVM heap.
    If I get that JVM heap, and am able to get all the objects created, I can locate the particular object that I am looking for.
    Is there a way to od this????
    Any suggestions ????
    Vikas

    JVMTI will mostly help you in this case. But i recomend you to review you application design, because such services are unsafe and rather tricky.

  • Using VPD/FGA to null specific columns for all but some users

    I've been reading up on VPD and - though there a numerous examples - I'm having a tough time putting them together.
    I have a table that - when most users select against - they should be getting NULL back in a specific column.
    That column should only display for a select group of users as a value of other than null.
    Can anyone help me out with an example of implementing this?
    Any/all help is appreciated.

    An extract from http://www.oracle-base.com/articles/10g/DatabaseSecurityEnhancements10g.php
    CONN sys/password@db10g AS SYSDBA
    GRANT EXECUTE ON dbms_rls TO scott;
    CONN scott/tiger@db10g
    -- Create the policy function to restrict access to SAL and COMM columns
    -- if the employee is not part of the department 20.
    CREATE OR REPLACE FUNCTION pf_job (oowner IN VARCHAR2, ojname IN VARCHAR2)
    RETURN VARCHAR2 AS
      con VARCHAR2 (200);
    BEGIN
      con := 'deptno = 20';
      RETURN (con);
    END pf_job;
    -- Using the same policy function as before.
    BEGIN
      DBMS_RLS.ADD_POLICY (object_schema         => 'scott',
                           object_name           => 'emp',
                           policy_name           => 'sp_job',
                           function_schema       => 'scott',
                           policy_function       => 'pf_job',
                           sec_relevant_cols     => 'sal,comm',
                           sec_relevant_cols_opt => DBMS_RLS.ALL_ROWS);
    END;
    -- All rows are returned but the SAL and COMM values are only
    -- shown for employees in department 20.
    SELECT empno, ename, job, sal, comm FROM emp;
         EMPNO ENAME      JOB              SAL       COMM
          7369 SMITH      CLERK          10000
          7499 ALLEN      SALESMAN
          7521 WARD       SALESMAN
          7566 JONES      MANAGER         2975
          7654 MARTIN     SALESMAN
          7698 BLAKE      MANAGER
          7782 CLARK      MANAGER
          7788 SCOTT      ANALYST         3000
          7839 KING       PRESIDENT
          7844 TURNER     SALESMAN
          7876 ADAMS      CLERK           1100
         EMPNO ENAME      JOB              SAL       COMM
          7900 JAMES      CLERK
          7902 FORD       ANALYST         3000
          7934 MILLER     CLERK
    14 rows selected.
    -- Remove the policy function from the table.
    BEGIN
      DBMS_RLS.DROP_POLICY (object_schema     => 'scott',
                            object_name       => 'emp',
                            policy_name       => 'sp_job');
    END;
    /The function returns "deptno=20" so any row matching this condition will display the sal and comm value , rest will display null.
    IN your case I guess you check for the user in the function who is executing the query (select user from dual), once you get the user see if this is a user who is suppose to see the columns values if yes return "1=1" otherwise return "0=1".

  • Get Collection Names for "emctl control agent runcollection"-command

    Hi,
    I have a really simple question, but until now I didn't find an answer by myself.
    At the moment I test a lot with provisioning software and databases with Cloud Control.
    When I install an agent on a new provisioning target machine it takes about 15 minutes (schedule of the metric collection) until cloud control knows everything about this host. (OS-version, etc.)
    The provisioning will fail before cloud control knows these information because of several checks.
    So I wanted to execute the collection of this information manually. Oracle Support told me to execute "emctl control agent runcollection <target_name>:<target_type> <collectionName>" on the target machine/agent.
    So far so good, but how to get the correct Collection name? (e.g. I want to discover the information about the host which you can see when you navigate to a host home under the section configuration on the left side. ... Operating System,  File System(GB) , Memory Size(MB) )
    Until now I was not able to find the correct collection names in MOS or in the Documenation.
    Oracle® Enterprise Manager Framework, Host, and Services Metric Reference Manual
    12c Release 1 (12.1.0.2.0)
    Part Number E25162-04
    http://docs.oracle.com/cd/E24628_01/em.121/e25162/host.htm#BABIBAHD
    Thanks & regards,
    Martin

    Hi,
    I think this is really difficult to find but I think the correct Collection for my problem is:
    "ll_host_config" (not tested yet if it solvs my problem but the command itself works)
    I found it here:
    1. connect to your OMS-Server (or one OMS server if you have an multi OMS environment)
    at first I tried to find default_collection directories (--> find $ORACLE_HOME -name default_collection)
    2. One directory is "$ORACLE_HOME/ccr/sysman/plugins/default/agent/default_collection"  (my OMS ORACLE_HOME is /u00/app/oracle/product/MW_EM12102/oms)
    3. I opened the file $ORACLE_HOME/ccr/sysman/plugins/default/agent/default_collection/host.xml and found the section
    <TargetCollection META_VER="4.1" TYPE="host">
        <!--generic-->
        <CollectionItem AGENT_MODE="GC,OCM" CONFIG="TRUE" NAME="ll_host_config" TIMEOUT="3600" UPLOAD_ON_FETCH="TRUE">
            <Schedule OFFSET_TYPE="INCREMENTAL">
                <IntervalSchedule INTERVAL="24" TIME_UNIT="Hr"/>
            </Schedule>
            <MetricColl NAME="ECM_HW"/>
            <MetricColl NAME="ECM_HW_CPU"/>
            <MetricColl NAME="ECM_HW_IOCARD"/>
            <MetricColl NAME="ECM_HW_NIC"/>
            <MetricColl NAME="ECM_HW_NIC_BONDS"/>
            <MetricColl NAME="ECM_OS"/>
            <MetricColl NAME="ECM_OS_COMPONENT"/>
            <MetricColl NAME="ECM_OS_FILESYSTEM"/>
            <MetricColl NAME="ECM_OS_PROPERTY"/>
            <MetricColl NAME="ECM_OS_MODULES"/>
            <MetricColl NAME="ECM_OS_REGISTERED_SW"/>
            <MetricColl NAME="ECM_OS_ULIMITS"/>
            <MetricColl NAME="ECM_OS_INIT_SERVICES"/>
            <MetricColl NAME="crs_act_soft_ver"/>
            <MetricColl NAME="ECM_SERVICETAG_INSTANCES"/>
            <MetricColl NAME="ECM_SERVICETAG_REGISTRY"/>
            <MetricColl NAME="ECM_TARGET_VERSIONS"/>
            <MetricColl NAME="ECM_INSTALLED_OS_PATCHES"/>
            <MetricColl NAME="ECM_ASSOCIATIONS"/>
        <MetricColl NAME="TARGET_UPDATE_INFO"/>
    </CollectionItem>
    4. The collection name can be found in this line: <CollectionItem AGENT_MODE="GC,OCM" CONFIG="TRUE" NAME="ll_host_config" TIMEOUT="3600" UPLOAD_ON_FETCH="TRUE">
    5. run the command "emctl control agent runcollection myhost.int.kn:host ll_host_config" on your provisioning target host. (in the agent environment / emctl of the agent)
    Thanks DK2010!
    Regards,
    Martin

Maybe you are looking for

  • Blue Screen of Death with XP and E1000

    I am getting the blue screen of death on my Thinkpad running XP and wireless G with E1000 router.  I have narrowed it down to issues with my wireless connection, but am wondering if I setup the router incorrectly.  Any suggestions?

  • Cisco Works LMS 3.1: ANIServer failed to start

    Hi fellows, I've been trying to start the ANIServer process manually, also rebooted the CW server couple of times, but the ANIServer process wouldn't start. This issue started 3 days ago and I'm sure no settings have been changed on the server. Any t

  • Number of days.

    BKPF-BUDAT + [BSEG-ZBD1T u2013 day of today = days in arrears (invoice was due) above logic how i will put in my sap script using subroutine. BKPF-BUDAT + [BSEG-ZBD1T u2013 day of today = days in arrears . EX:  20.04.2009 + 30 - 15.05.2005 = 24 How c

  • Trying to invoke HTTPService with SOAP request

    Hi all, I have been trying to invoke a HTTPService with a SOAP request. Most of the times I get an error saying that the client has invoked HTTP with get instead of a POST eventhough my code takes care of it. Any clue on this? I have copied the code

  • Dumb question...once I build the DVD IMAGE (ISO)  and a DVD FOLDER

    Can I burn the ISO file FROM ENCORE or the DVD FOLDER? thx