Creating ENUM dynamically string Array

Hello

I was wondering if it was possible to create an ENUM dynamically? For example, I would like to read values from an array of strings and use each element to add a new element in the control of the ENUM. If this is not possible, how to set up a structure deal to read values from an array of strings as an ENUM would normally be able to? It would help enormously if I didn't have to manually enter the string name for each particular case. Thank you very much.

Ditto the comments of Dan.

If you ask because you want to just save you a lot of work when editing, you could wrie all your channels to a ring and then right-click and choose replace > enum and the object will change to an enum with all the ropes of the ring.

Be sure to include the case by default since you are dealing with strings.

I hope this helps,

Ben

Tags: NI Software

Similar Questions

  • Best way to transfer strings, arrays and clusters

    Hi, I just want to know the best way to transfer strings, arrays and clusters between a PC and a computer-RT (compactRIO) if I want to use them in deterministic loops:

    For a string should I use a published network shared variable flow or network?

    For an array of doubles should I flatten the array in a string and the string of transfer? or should I send it as a picture?

    The same for clusters, should I flatten the cluster or the transfer as a cluster?

    Thank you!

    Transfers on the network are not deterministic.  You ask how to use the data in a deterministic way, once it arrives on the RT system.  Usually, you would create a separate loop, not critics of time to deal with network communications.  The data arrives it is copied in real-time-safe structures such as RT-FIFO to put at the disposal of the evanescent loop.

    I can't give you specific advice on network variables and network flows; Finally, I did this kind of transfer over TCP, until these other options were available.

  • Tips on creating a hexadecimal byte array

    I am communicating with a PLC by sending data series in the form of hexadecimal bytes commands. for example

    02 30 31 34 32 33 59 30 30 34 31 31 41 03

    I implemented the communication protocol and everything works fine. I send my orders and I get the right answer.

    the problem: I need to insert into my vi 3 x 55 = 165 at least these commands in this format. of course, I could copy - paste into a string variable and do my job. but I need to find a more practical way because they might change in the future. thought of creating a txt with the commads and then create 3 arrays of strings in my vi but I still need to send data HEX.

    I have my orders in almost any shape I want as I generate them in python.

    for example

    (HEX) 02 30 31 34 32 33 59 30 30 30 30 31 35 03 or

    2 48 49 52 50 51 89 48 48 48 48 49 53 3 (DEC) or

    0x02 0 x 30 0 x 31 0 x 34 0 x 32 0 x 33 x 0 59 0 x 30 0 30 x 0 x 30 0 x 30 0 x 31 0x35 0x03

    It works almost well, but converts me 02-> 0 to 30 and 2 to 32.

    and that's what I get (display as HEX in table properties). I just need the line of the txt string to be interpreted as a hexagon and build a table.

    any help will be appreciated. Thanks in advance.

    Your code is too complicated.  First of all, there is an option to right click on the file reading read the lines.  You can then autoindex on lines, elimination of one of your curls.  Second, you can do all the analysis and conversion of your row of data with just the string array spreadsheet function.

  • String array to strings

    Hi everyone, thank you for your time.

    I recorded in a file of data like this:

    name address telephone e-mail, etc.

    Each field is separated by a tab (\t) delimiter.

    I have read each line of the file with the text file reading and read audit function lines, and then use the index string array, the result is: each while the iteration I can get the full range of text (String), I want to convert this string with fields of tab separated in an array of strings.

    Example:

    input string (name address phone email)

    Output of the elements of the string array: name

    address

    Phone

    E-mail

    Thank you all, I would appreciate any help.

    Get a constant table and create a string array, then you can change your output data type.

  • Network Variable string array

    Hi all

    I'm working on a project that would require one program to talk to another (same computer) program, where the use of the network variable.

    Now say that I have a list or a table of names that the changes in a single program, what I would do is to take parts of the list that is in a single program and transfer parts of the list to another program.

    The list must be transferred at least 40 unique names of different sizes with letters.

    I have data tables ready I just need to understand the part of the transfer.

    I tried the 3D.sim, but it seems to be a problem when I'm with strings, especially when the strings are of different lengths.

    Also when using the CNVCreateArrarDataValue errors on table place being small on the size of the array?

    String array lists are usually 2D (line and size) does that factor in?

    Assume the network variable is declared

    code exp just to get the idea...

    int i = 0, numItems = 10;

    Data CNVData = 0, NVlist [120]= {0};

    size_t dim= {0};

    size_t dim2 = {0};

    for (i = 0; i<>

    {

    char name [20] list = "0" / "."

    GetTabelCellValue (Panel, PANEL_LIST, MakePoint(2,i), name of the list);

    Dim [0] = strlen (listName);       I tried size_of but definalty did the Sun big

    CNVCreateArrayDataValue (& NVList [i], CNVString, name of the list, 1, Sun) ///i get questions of size table here

    dim2 ++;

    }

    CNVCreateStructDataValue (& data, NVList, dim2) ///here is another problem with dimensions

    CNVPutDataInBuffer (handle, data, 2000);

    I also tried

    for (i = 0; i<>

    {

    char name [20] list = "0" / "."

    GetTabelCellValue (table, list, MakePoint(2,i), name of the list);

    Dim [0] = strlen (listName);

    CNVCreateDataValue (& NVList [i], CNVString, name of the list)

    dim2 ++;

    }

    CNVCreateStructDataValue (& data, NVList, dim2) transfers of value of string ///one

    CNVPutDataInBuffer (handle, data, 2000);

    I think I'm close, but just can't get the right sequence

    Thanks

    lriddick,

    You can write an array of strings easily, but it must be an array of strings. It cannot be a two-dimensional character array, which is not the same thing. For example, the following code should work (I replaced your table with a table called "table", but the rest should be the same). Note that I have create only a single CVNData, not a picture of CNVData:

    char * array [] = {'one', 'two', ' three', 'four', 'five', "six", "seven", "eight", "nine", "ten"};
    char * name [10] list;
    CNVData = 0, NVList data;
    size_t dim [] = {10};
    for (i = 0; i<>
    {
    name of list [i] = malloc (strlen (table [i]) + 1);
    strcpy (name of list [i] table [i]);
    }
    CNVCreateArrayDataValue (& NVList, CNVString, listName, 1, Sun);
    for (i = 0; i<>
    free (listName [i]);

    CNVPutDataInBuffer (handle, NVList, CNVWaitForever);

  • Error #1056: Could not create property 0 String.

    I found similar to this subject positions but could not find my situation.

    I have 2 tables, one is filled earlier in the program by entries of the user in the following format:

    VideoArray [0]: Nothing

    VideoArray [1]: [object]

    VideoArray [1] [0]: String (this string is registration by the user in a text field)

    VideoArray [1] [1]: String (this string is registration by the user in a text field)

    Then, it follows the pattern of user input:

    [2]: object

    [2] [0]: string

    [2] [1]: string

    [3]

    [3] [0]

    [3] [1]

    ... Repeat for as long as the user enters data.

    I try to copy the data in another table by using a series of loops since I won't know how many sets of data from user input. I need not the object data in the new table. The new array (InfoArray) will be structured as follows:

    InfoArray [0]: String

    InfoArray [1]: number

    InfoArray [2]: Nothing

    InfoArray [2] [0]: VideoArray [1] [0]

    InfoArray [2] [1]: VideoArray [1] [1]

    InfoArray [3] [0]: VideoArray [2] [0]

    InfoArray [3] [1]: VideoArray [2] [1]

    .. Repeat until all the data is copied.

    I do this with the following:


    ArrayCount = VideoArray.length + QuestionArray.length + 2



    for (var i: int = 0; i < = ArrayCount; i ++)



    {




    If (i == 0)




    {





    InfoArray [i] = ModuleName;




    } else




    {





    If (I == 1)






    {







    InfoArray [i] = Number_Of_Videos;





    } else






    {







    If (I < = Number_Of_Videos + 2)






    {







    InfoArray [i] = [];






    for (var j: int = 0; j < = 1; j ++)






    {







    trace ("I =" + i);






    trace ("j =" + j);






    trace ("VideoArray [i-1] [j]:" + VideoArray [i-1] [j]);






    InfoArray [i] = ' video: '; "
    Line 272




    InfoArray [i] [j] is VideoArray [i-1] [j];.





    }





    } else






    {

    (don't know why he copied the code like this, I couldn't find a button "Insert code")

    When I run it, I get my tracks and the error:

    I have = 2

    j = 0

    VideoArray [i-1] [j]: v1

    ReferenceError: Error #1056: cannot create property 0 String.

    at BWSModuleGenerator_fla::MainTimeline/Compile_Info() [BWSModuleGenerator_fla. [MainTimeline: frame1:272]

    Ive never gotten this error before and im not sure what is wrong with my code.

    Thanks for any help.

    It's a little confusing trying to follow your data storage scheme and that could be a big part of the problem, but for two lines show you...

    InfoArray [i] = ' video: '; "

    InfoArray [i] [j] is VideoArray [i-1] [j];.

    If the first is a string, the second cannot be an element of a table if that is the intention.  It seems that the compiler considers to try to target a property from a string using the notation of support where the [j] at the end is interpreted as a property, not an index of an array.

  • Create a dynamic text in Flex with different attributes

    I create a Flex text field that looks like this:

    < mx:HBox id = "lastInfo" styleName = "Bar" width = "100%" visible = "false" >
    < text mx:Text = "' your last question was:" styleName = "underline" / > "
    < mx:Text id = "lastQuestion" styleName = "bold" / >
    < mx:Text text = "in the context:" / >
    < mx:Text id = "lastContext" styleName = "bold" / >
    < text mx:Text = "' the last line:" styleName = "underline" / > "
    < mx:Text id = "lastAnswers" styleName = "bold" / >
    < / mx:HBox >

    The text that is not dynamic needs to be emphasized. The text that arise in a dynamic way must be bold.

    lastQuestion, lastContext and lastAnswers are dynamically filled. The problem is that if lastAnswers width exceeds the threshold of the HBox it isn't newline at the beginning of the complete chain.

    How can I create this complete string dynamically and with highlights and fat all-in-one text, so it will be transport back to the beginning?

    Hi Cootis,

    Now, I understand your question, but the approach that you use is not correct I think because for the formatting you want you must use a single control and assign the htmlText dynamically.

    See the code example below:


    http://www.Adobe.com/2006/mxml"layout ="absolute"creationComplete ="init (); » >


       
    private var lastQuestion:String = ""what is your name.'; "
    private var lastContext:String = "your name";
    private var lastAnswers:String = 'John John John JohnJohn-JohnJohn-JohnJohn-JohnJohn-JohnJohn-JohnJohn John';
          
    public void init (): void
    {
    variableText.htmlText = "your last question was:" + lastQuestion + "context:" + lastContext + "the last replica:" + lastAnswers;
    }
    ]]>


        

    So you have to pouplate variables dynamically, that's all.

    I hope it works for you.

    If this post answers your question or assistance, please mark it as such.

    Thank you

    Jean Claude Chari

  • These can be wired together as their data types (digital, string, array, cluster, etc.) do not match.

    Hi, I get an error update LabVIEW 8.2 for 2011:

    These can be wired together as their data types (digital, string, array, cluster, etc.) do not match. View the contextual help window to find out what type of data is required.
    The type of the source is cluster of 2 elements.
    The type of the sink is typedef "IMAQ Image.ctl"
    IMAQImage (IMAQImage,).

    This type of incorrect argument can be caused by an old instance of the Image data type.
    To fix, simply replace the instance with the definition of type IMAQ Image.ctl in the control menu of the image palette.

    The source is:

    Call library function node - image (dup)

    The sink is:

    IMAQ_array for image - image

    I tried to delete the image VI IMAQ_array & always replacing but it connects...

    Here is a picture of the VI, I have a number of VI to update and they all have this problem

    Home is also the VI.

    See if you can shed some light on this

    The solution, he had to do with the representation of images in the old and the version of Labview

    I'm completely new to NI Vision, so I had no idea what I was looking for

    from this thread:

    http://forums.NI.com/NI/board/message?board.ID=200&message.ID=5849#M5849

  • Table row of string to string array column

    Perhaps, it's getting late... However, I can't figure out how to convert my string column to a line string.  That said, I read the other articles and none of them are solutions to my problem.  Please see the jpg files to see what I mean.

    So on the front panel, I have a "row" chain control  However, when I save on my .dot (word template) file, it spits out a column of data.  Because this column contains my column headers, I need them to display as a line.  Someone has suggestions on how to "force" it to show in the model as a line instead of a column?

    Never mind the help.  I found a solution to the problem.

    While everyone knows... If you want to change the deminsions of a string array simply use the function "reshape array" in the tool range.  Deminsion size is the number of lines and the bottom is the number of columns.  Just wire to the top and go!

    -------------- to

    -

    -

    -

    -

    -

    -

    -

    and vice versa.

    David

  • Hello all, I need help with creating a dynamic region in jdeveloper 11.1.2.3 version

    . Hello everyone, I need help with creating a dynamic region in jdeveloper 11.1.2.3 version

    What JDK you are using?

    You are probably using an old version of the JDK, that class while compiled under JDK 1.7.0

    http://java67.blogspot.com/2012/10/how-to-fix-javalangunsupportedclassversionerror-major-minor-version-49-50-51.html

    For example, work with the correct version, and it will be fine...

  • How to create a dynamic lov inside the table?

    Hi all

    I use JDeveloper11.1.1.1.4.

    My scenario is that I have page with editable < af:table >. Table contains a < af:inputListOfValues > inside the column. I want to do this < af:inputListOfValues >

    as a dynamic. Because according to users, we have to get the chronogram different objects in different point of view. I tried with below link it works very well for forms.

    But editable tables, I'm not able to create the dynamic lov.

    ADF practice: dynamic linking LOV

    Thank you

    David.

    Hello David

    have you tried ADFbc lov switcher?

    See - Andrejus Baranovskis Blog: Groovy - multiple LOV by attribute in JDeveloper 11 g

    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/89-adfbc-lov-switcher-454168.PDF

    Thank you

  • How to create a dynamic custom stamp?

    Is there a way to create a dynamic custom stamp?

    Hi Bruce,.

    Please try this: https://acrobatusers.com/tutorials/custom_dynamic_stamp

    Thank you

    Abhishek

  • create a dynamic group for all virtual machines

    I would like to create separate dynamic groups for all my Windows virtual machines and physical machines of my Windows.  Is it possible to do it via regular expressions?  It is not granular enough to create something like this.  We have vROps that collects a large number of settings of virtual machines as its CPU usage, use of memory and use of the network to name a few.  If I install Hyperic on those virtual machines it will collect the same measures and I'll have to duplicate the data in vROps.  So I would like to have a separate profiles for Win32, CPU, physical disk on file server, etc., for virtual machines and physical machines.  I was going to try using dynamic groups, but I don't think that Hyperic will be able to handle this.  If you have any suggestions or knowledge on this operation through dynamic groups that would be great.

    Thank you.

    In UI Hyperic access the platform in platform type choose Win32 and press the green icon. You will see all the windows.

    Now select all platforms and press the 'Group' button > add to the new group

    Good luck

  • I am trying to create dynamic landing pages that reflect the locations of my Google ads. How can I create a dynamic text on my landing page to specify the location in the title?

    I am trying to create dynamic landing pages that reflect the locations of my Google ads. How can I create a dynamic text on my landing page to specify the location in the title?

    Thanks a lot for your answer. I've sorted it now.

    Kind regards

    Gill

  • Failed to create a dynamic action ALERT to build a Select list when selecting a particular value.

    Hi everyone, this should be so easy, and yet I'm stuck.

    I have a form with a P110_VESSEL_ID element.   This article is a list of selection.   It is based on the query:

    Select distinct v.vessel_name, v.vessel_id

    of ships v, frequent_fishermen ff

    where ff.dea_permit_id =: G_PERMIT_ID and

    FF:vessel_id = v.vessel_id

    UNION

    Select v.vessel_name, v.vessel_id

    of apex_collections v, vessels

    where collection_name = "SUPVES_COLLECTION" and

    a.C002 = v.vessel_id

    If the user decides from the values in the selection list query, they can opt to SELECT all THE VALUES.  This SELECT all VALUES is a TEXT of ITEM POST on P110_VESSEL_ID.

    < a id = "popVessels" href = "#" > < font color = blue > select all < /a > ships

    It all works very well.

    The problem is that when the user selects a boat name = "UNKNOWN" and it is corresponding to the value of vessel_id, I want an ALERT to appear indicating that they should check that the boat is UNKNOWN and no one's any ship.

    I created a dynamic action

    event = change

    Select type = item

    Item = P110_VESSEL_ID

    Real ACtion #1 is the ALERT.

    Currently, I have no other logic, but can't even get this working.  All thoughts.   I also tried the SELECT TYPE = jQuery Selector = select [name = "P110_VESSEL_ID"], but that does not work either (although I am not sure if the value must be P110_VESSEL_ID or static VESSEL_ID name).

    Any help is appreciated.

    PS. the page is not submitted when the ship is changed.  There are other data that should be in this region and others and many validations run when submit to submit would not be an option.

    Thanks again,

    Karen

    Is (BOAT = UNKNOWN) a single value with a single vessel_id? If Yes and for example if the vessel_id is 99, then proceed as follows:

    Add an expression "JavaScript" in your dynamic action.

    In the Condition value, enter:

    this.triggeringElement.value == "99"
    

    -Jeff

    And I agree with Nicolette, there is something wrong with some other DA who is at the origin of the DAs after that does not work.

Maybe you are looking for

  • Location to Siri services do not work.

    Hi all. My location to Siri services won't work. If I tell siri to "remind me to check my mail when I'm at work" Siri comes back and say that I need to enable location for reminders services. Then I do. So I try again, and Siri says the same thing...

  • Which system is best for minecraft and sims?

    Should I assume that a mac mini is not useful if I use boot camp to play these games? If this is the case then I have to assume the mac mini (without using boot camp) is not good for these types of games on the right? My choice for a new system are:

  • iPhone 5s stuck in a continuous reboot loop

    My 5s iPhone has always been great. IOS is underway. My daughter used it yesterday evening at the stream of Pandora, but had finished and he's just sitting there. He started a continuous restart loop. I tried hard reboot (still a few cycles) and I tr

  • TouchSmart 520: Camera not recognized

    I had my Touchsmart for 2 or 3 years now and have always used with Google Photos (Picasa) for edit and download. I first used a Canon EOS 400 d and a couple of years, upgraded to a 7 d. All were working well. Last week, I returned from vacation with

  • BlackBerry icon 'H - T' on Q10 Q10.

    What does the 'H - T' icon, which appears in the upper left corner of my phone mean? How can I turn off?