English

Error: AML ERROR - Result too long, function [listunique]

Error Message

The AML LISTUNIQUE function returns:

"AML ERROR - Result too long, function [listunique]"

Cause

If the <output_name> file argument is not specified, the LISTUNIQUE function returns a comma-delimited list of the unique item values for the specified item on the input feature attribute table or INFO file. An AML token may not exceed 1024 bytes. The fatal error occurs when no output text file name is specified and the comma-delimited list of unique item values exceeds the AML 1024 byte token limit.

Solution or Workaround

Note the AML [LISTUNIQUE] function usage.

[LISTUNIQUE <specifier> <-ADDRESS | -ARC | -INFO | -LINE | -NODE | -POINT | -POLYGON |-REGION.<subclass> | -ROUTE<.subclass> | -SECTION<.subclass> | -STACK TAT.<subclass> | -TIC | -VAT> <item_name> {output_name}

Use the optional <output_name> argument to specify an output text file. No item values are returned in the AML token. Instead, a zero or positive AML token value indicates the total number of unique item values. The function writes each unique item value as one record in the specified output text file.

The AML file handling functions [OPEN], [READ], and [CLOSE] can be used to access each output text file record. Within an AML loop on each record of the output text file, the set of features or INFO records with the same item value can be selected. If desired, an AML cursor could be used to individually process each feature or INFO record within the current selected set.