Programmatically get names of all cases in a case structure

Hi All,
          I have a subVI that is a state diagram (controlling some test equipment), with many states (i.e. each "state" is a case of a case structure), a text string chooses the case. All cases are named.
         Within this subVI is it possible for me to programmatically retrieve the text name for each case of this case structure? I wish to be able to retrieve these strings so that the main VI will only be able to call valid states.
        I have error handling to ensure that if an invalid state is called (by using the default case) that an error will be returned to my main vi, yet I would prefer to be able to retrieve the string to prevent any typo's etc.
      Not sure if I've explained this well.
     Thanks,
    ds1
Solved!
Go to Solution.

You can do it with LabVIEW scripting, however, I wouldn't leave scripting in a final application. Use a typedef enum if you don't want to worry about this. If you want to keep it as a string (remember, this is a heavily debated subject) just make sure you test all cases before making it an executable and that should suffice. If you want to check to make sure it's a valid string, this seems like a bit overkill on the error checking! Just work it out when testing, or again as was said above, use a typedef enum.
CLA, LabVIEW Versions 2010-2013

Similar Messages

  • How to get names of all hard disks?

    Hi,
    How to get names of all hard disks.
    For example:
    There are 3 disks in my computer: A, C,D (OS: Windows).
    and then I want to know how many disks (3) and their names( A, C, D) are there?
    Please give me some code sapmles. Thanks.
    (---sorry, my English is not very well----)

    Look at a few of these
    http://onesearch.sun.com/search/developers/index.jsp?qt=%22hard+disk%22+label&qp=forum%3A31&qp_name=Java+Programming&col=devforums

  • How to get names of all Windows in a Form Application at runtime

    Dear All,
    I want to get the name of all windows in a form module programatically at run time. How to get it?
    Any help or comments will be highly appreciated.
    Thanks in Advance.
    Best Regards
    Bilal

    Hi Francois Degrelle,
    First of all thanks for the response.
    What if I have no items on a content canvas? In my application, I am using content canvas to hold the Image banner and help text of the current form, having no items at all. I am also using tab canvases to hold all items of form. The tabs are displayed on the content canvas at run time. So the tab canvases acts like frames (In my case).
    Now if I am looping through items, it gives me the list of all of the tab canvases. Whereas the tab canvas always has no window assigned, as it is displayed on content canvas which has that Window which I need. Thus I am unable to get the names of windows in my case through the above stated procedure.
    Another option could be if I can get the name of the content canvas upon which the given tab canvas is displayed?
    Any way to do this or some other way to achieve the use case?
    Any help will be highly appreciated.
    Thanks in advance
    Bilal

  • How to get names of all used separations?

    Hi there
    How can I get the names of all used color-separations with javascipt?
    CMYK and used spot-colors.
    I want to place them into a textbox in illustrator (CS4) with a script.
    Does anybody can help me??
    thanks a million

    List of inks can be obtained from Document.inkList and iterate through each ink to find whether InkInfo.printingStatus is set to "ENABLEINK"
    here is the script
    mydoc = app.activeDocument;
    mydocTotalInkList = mydoc.inkList
    mydocUsedInkList = new Array ();
    j =0;
    for (i=0;i<mydocTotalInkList.length;i++)
        if(mydocTotalInkList[i].inkInfo.printingStatus=="InkPrintStatus.ENABLEINK")
           mydocUsedInkList[j] = mydocTotalInkList[i].name;
           j++;

  • Getting names of all files in a directory.

    import java.io.*;
    import java.util.*;
    public class dir{
         public static void main(String args[]) throws IOException{
              //BufferedReader in = new BufferedReader(new FileReader(args[0]));
              PrintWriter out = new PrintWriter(new FileWriter("dir.txt"));
              File file = new File(args[0]);
              //FileFilter filefilter = "log";
              Vector x = new Vector();
              int vlength;
              x = getDirectoryContent(file);//,filefilter);
              vlength = x.size();
              for(int i=0;i<x.size();i++){
                   out.println(x.elementAt(i));
              out.close();
         public static Vector getDirectoryContent(File file){//, FileFilter fileFilter){
              Vector v= new Vector();
              if (file.isDirectory()) {
                   File[] content = file.listFiles();//fileFilter);
                   for (int i=0; i<content.length; i++){
                        v.addElement(content);
                   }//for
              }//is directory
              return v;
         }//getDirectoryContent
    That is the code that I am using, what I am trying to do with it is read all the files in a directory. So I can open them and calculate all the data in all of the files at the same time.
    These are the file names that are in the directory when I run the program.
    L0519013.log
    L0331001.log
    I have the code out put the file names in a file called dir.txt
    after running the program this is what I get in the output file.
    [Ljava.io.File;@70ccc4b2
    [Ljava.io.File;@70ccc4b2
    [Ljava.io.File;@70ccc4b2
    Any clue waht this means?
    also I am passing in the director as args[0]

    if possible as well...
    I could not get the FileFilter to work, could not get the syntax down to get it to work when I was initializing it so for the moment it is remed out. all files in the given directory will be of type .log so there really is no need for the FileFilter. But any help on how to include that in the code would be greatly helpful.
    Thankxs
    Korbin

  • Programmatically get name of object?

    Is it possible to call a method on a object to get the name of that object---the variable name, not the name of its class?
    Example:
    Person fred = new Person();
    Person barney = new Person();
    List names = new ArrayList();
    names.add(fred);
    names.add(barney);
    for (Object o : names) {
         System.out.println(o.methodThatGivesObjectName()); // should print "fred" and "barney"
         //...print out other info about the object...
    }It seems like this should be possible, but maybe it's not. BTW, I know I could add a "name" field in this example, but I actually want to do this with other objects, like arrays.
    Thanks,
    Gregory

    GregoryGarretson wrote:
    Is it possible to call a method on a object to get the name of that object---the variable name, not the name of its class?
    Example:
    Person fred = new Person();
    Person barney = new Person();
    List names = new ArrayList();
    names.add(fred);
    names.add(barney);
    for (Object o : names) {
         System.out.println(o.methodThatGivesObjectName()); // should print "fred" and "barney"
         //...print out other info about the object...
    What if you add the following code before putting the objects in the list?
    Person wilma = fred;
    Person betty = barney;You've now got two variables pointing to each object. Which one is the object's "name" and why?
    And if you add this code after adding to the list but before printing
    Person tmp = fred;
    fred = barney;
    barney = tmp;Now fred and barney have swapped which object each points to. What are the "names" of the objects now, and why?

  • Is it possible to programmatically get the label name(s) of a VI's connector pane IPs and OPs?

    I can get the number of IPs & OPs using the metrics VI but not the variable names, any help much appreciated.
    Certified LabVIEW Architect

    You can get names of all controls and of all indicators. Use Get All Controls method of VI server.
    This is not exactly that you want but may be will help you.

  • How to get names of sub tabs?

    Hi All,
    Could someone tell me how to get names of all sub tabs?
    I have Parent Tab T1. T1 has 3 sub tabs T1_1, T1_2 and T1_3.
    I would like to have T1_1, T1_2 and T1_3 sub tab names in the list.
    Thanks in advance!!
    Dip

    Dip,
    You can get the tab names from apex dictionary views, apex_application_tabs & apex_application_parent_tabs . Thanks.
    Regards,
    Manish

  • Urgent: How to get the names of all menu items

    I have a .mmb menu module.
    There are many menus and submenus in it.
    Now I want to get the names of all menu items available in the module using sql or pl/sql.
    Actually I need to store these names in another table as it is. That is why I want get them programmatically.
    Any solution please.... bit urgent
    Thanks

    When I needed the same, I wrote my own application using
    Forms API (Windows,Forms 6.0,6i). Perhaps it will help
    you.
    Let me know your e-mail and I'll send it.

  • 9I: How can get the names of all objects in a package header? [RESOLVED]

    Is there a way to get the names fo all objects (function, procedures) from package header
    select * from user_objects only gives the the header name, I need the object in the header.
    John
    Message was edited by:
    johnminkjan

    Here is an example with dbms_output package!
    SQL> select owner, object_name,procedure_name from all_procedures
      2  where  object_name='DBMS_OUTPUT';
    OWNER                          OBJECT_NAME                    PROCEDURE_NAME
    SYS                            DBMS_OUTPUT                    GET_LINES
    SYS                            DBMS_OUTPUT                    GET_LINE
    SYS                            DBMS_OUTPUT                    NEW_LINE
    SYS                            DBMS_OUTPUT                    PUT_LINE
    SYS                            DBMS_OUTPUT                    PUT_LINE
    SYS                            DBMS_OUTPUT                    PUT
    SYS                            DBMS_OUTPUT                    PUT
    SYS                            DBMS_OUTPUT                    DISABLE
    SYS                            DBMS_OUTPUT                    ENABLE
    9 rows selected.
    "or"
    SQL> desc dbms_output

  • How can I get IP and hots names of all the machines.....

    I need to get the IP addresses and host names of all the machines in my netowrk and need to select only is a HP / Compaq x86 machines finaly.
    If you know atleast a part of this please help me.
    [email protected]

    You coulduse the broadcast address (x.x.x.255) in an ICMP sweep to determine which hosts are alive (and accepting ICMP).
    But no, there's not a single (and definitive / sure) way to retrieve all IP addresses.

  • Getting system names of all the nodes that compose a cluster

    I need a way to get the names (weblogic.system.name) of all the servers that compose a cluster from a JSP or a servlet. Can anyone help ?
              System: Weblogic 5.10sp10 on Solaris with SDK 1.3.0
              [att1.html]
              

              Using WLS 5.1 internal APIs, you can do this by the following:
              weblogic.cluster.ClusterManager clusterManager = weblogic.cluster.ClusterManager.theOne();
              com.sun.java.util.collections.Collection c = clusterManager.getClusterMembers();
              weblogic.cluster.ClusterMemberInfo[] infos =(weblogic.cluster.ClusterMemberInfo[])
              c.toArray(new weblogic.cluster.ClusterMemberInfo[0]);
              if (infos != null) {
              for (int i=0; i < infos.length; i++) {
              ClusterMemberInfo info = infos;
              String clusterName = info.name();
              System.out.println("Cluster Name is: " + clusterName);
              "Laurent PAILLARD" <[email protected]> wrote:
              >C'est un message de format MIME en plusieurs parties.
              >
              >
              >I need a way to get the names (weblogic.system.name) of all the servers
              >=
              >that compose a cluster from a JSP or a servlet. Can anyone help ?
              >
              >System: Weblogic 5.10sp10 on Solaris with SDK 1.3.0
              >
              >
              ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
              ><HTML><HEAD>
              ><META http-equiv=3DContent-Type content=3D"text/html; =
              >charset=3Diso-8859-1">
              ><META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
              ><STYLE></STYLE>
              ></HEAD>
              ><BODY bgColor=3D#ffffff>
              ><DIV><FONT face=3DArial size=3D2>I need a way to get the=20
              >names (weblogic.system.name) of all the servers that compose a =
              >cluster from=20
              >a JSP or a servlet. Can anyone help ?</FONT></DIV>
              ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
              ><DIV><FONT face=3DArial size=3D2>System: Weblogic 5.10sp10 on Solaris
              >=
              >with SDK=20
              >1.3.0</FONT></DIV></BODY></HTML>
              >
              >

  • How to get he names of all the local drives that are present in hdd

    Hi ABAP Experts,
    I want to get the names of all the local drives that are present in hdd on local system using
    ABAP. Is this technically possible. If so how.
    Thanks & Regards,
    Aexandr Ciunchik

    Hi Alexandr,
    My workaround.
    REPORT zztest.
    DATA : len          TYPE i,
           off          TYPE i,
           directory    TYPE string,
           result(1).
    len = STRLEN( sy-abcde ).
    DO len TIMES.
      off = sy-index - 1.
      CONCATENATE sy-abcde+off(1) ':' INTO directory.
      CONDENSE directory NO-GAPS.
      CALL METHOD cl_gui_frontend_services=>directory_exist
        EXPORTING
          directory            = directory
        RECEIVING
          result               = result
        EXCEPTIONS
          cntl_error           = 1
          error_no_gui         = 2
          wrong_parameter      = 3
          not_supported_by_gui = 4
          OTHERS               = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      IF result EQ 'X'.
        WRITE : / 'Drive : ',
                  directory.
      ENDIF.
    ENDDO.
    Regards,
    AS

  • Getting the names of all classes

    Hi,
    I want to write a Java editor with code completion. Is there a way to get all the class names available in the installed Java run time environment.
    Does the reflection API provides a way to do it.
    Thanks a lot,
    Chamal.

    You can also look at JPDA (should be documented as part of your JDK under 'Tool Support' of the documents index), and the JDI api VirtualMachine.allClasses() method.
    That will return the name of all loaded classes, which will not be the same as all classes on the path, as it includes any dynamically created classes, and excludes any classes on the path not loaded.
    Pete

  • Function module to get the name of all the function module used

    I want to populate a internal table with the name of all function module used in the submitted program?? Is there any function module which return the name of all the function module used?

    Hi Priya
    Try this one RPY_FUNCTIONMODULE_READ.
    Ranga

Maybe you are looking for

  • K8NGM2-FID w/6150 nvidia video no signal thru DVI

    I just bought my Viewsonic 20" wide display LCD monitor. I am getting a "no Signal" message when I try to connect to the DVI. Regular analog works great in fact everything works great ecept the DVI adapter. Any suggestions? MY build AMD Athalon x64 X

  • 19000  emails in Mail

    I currently have 19000 emails and growing in my Mail application. I know this may seem stupid to have so many, but I run a small business and often have to quickly 'search' Mail to reference questions about previous communication with customers. I ha

  • Firefox and Flash

    I downloaded and installed Adobe FlashPlayer recently from Internet Explorer (IE), when I attempting to review an ecard at the Blue Mountain website. This operation worked and I was subsequently able to view the cards. Today, I was using Firefox, as

  • Drawing curved lines in Photoshop CS 4

    I'm sure there's a simple way, but I just can't seem to draw a basic curved line in PS CS4. I'm designing a simple floor plan- black lines on white background- nothing 3D or fancy. I have so far just used straight black lines, but for the doors I wan

  • Where do I find the Work Files Folder

    Where do I find the Work Files Folder?