Searches under a variable container and returns an array of references to variable objects that match your search criteria. You can use this function to find variables programmatically.

All search criteria are optional. If you leave a search criterion input terminal unwired, this function does not filter based on that criterion.


icon

Inputs/Outputs

  • cgenclassrntag.png class

    class specifies the class of the variable objects to search for. The default is Variable Object.

  • cgenclassrntag.png container refnum in

    container refnum in specifies the variable container under which to search. This function searches the full container hierarchy under the container you specify.

    This function searches the partial URLs of all variables under the container you specify. The partial URLs do not include the URL corresponding to this container.

  • cstr.png regular expression

    regular expression is the pattern to search for within the variable object URLs. The default is an empty string.

    This function uses the same regular expression rules as the Match Regular Expression function.

  • cfxdt.png data type

    data type specifies the data type of the shared variables you want to search for. The default is variant, which specifies that if you leave the terminal unwired, the function does not filter based on data type. However, if you wire a variant control or constant to this terminal, the function returns variables of the variant data type only.

  • cerrcodeclst.png error in

    error in describes error conditions that occur before this node runs. This input provides standard error in functionality.

  • cnclst.png access type

    access type specifies the read access and write access settings of the shared variables you want to search for. The default value is Allowed for both read access and write access.

  • cenum.png Read Access

    Read Access specifies options for filtering shared variables based on read access.

    0Allowed—Performs no filtering based on read access.
    1Required—Returns only shared variables with read access enabled.
    2Denied—Returns only shared variables with read access disabled.
  • cenum.png Write Access

    Write Access specifies options for filtering shared variables based on write access.

    0Allowed—Performs no filtering based on write access.
    1Required—Returns only shared variables with write access enabled.
    2Denied—Returns only shared variables with write access disabled.
  • igenclassrntag.png container refnum out

    container refnum out is the reference to the shared variable container you wire to the container refnum in input.

  • i1dgenclassrntag.png refnum array out

    refnum array out contains the variable object references that result from your search.

  • ierrcodeclst.png error out

    error out contains error information. This output provides standard error out functionality.

  • The search matches the regular expression you specify against the partial variable identifier URLs of all variable objects under the variable container you specify. The partial URL does not include the initial URL substring that corresponds to the URL you wire to the container refnum in input.

    For example, if you wire a URL of ni.var.psp://lib1 to the container refnum in input, the partial URL for a variable object with the URL ni.var.psp://lib1/lib2/var1 becomes lib2/var1.