get_collection_size (::quartus::misc)

The following table displays information for the get_collection_size Tcl command:

Tcl Package and Version

Belongs to ::quartus::misc 1.0

Syntax get_collection_size [-h | -help] [-long_help]
 
[ <collection> ]
Arguments -h | -help Short help
-long_help Long help with examples and possible return values
<collection> Collection
Description
Returns the size of a collection.

Unlike a Tcl list, a collection is a container specific to the
Quartus Prime software, whose elements can be accessed by using the
"foreach_in_collection" command.
Example Usage
## Displays the number of global assignments
project_open chiptrip
set num_global_asgns [get_collection_size [get_all_global_assignments -name {*}]]
puts $num_global_asgns
project_close
Return Value Code Name Code String Return
TCL_OK 0 INFO: Operation successful
TCL_ERROR 1 ERROR: Collection does not exist with name: <string>. Specify the collection name returned by a Tcl command that supports foreach_in_collection.
TCL_ERROR 1 ERROR: Nested calls to foreach_in_collection with the same collection name <string> are not allowed. Specify a different collection name for the other collection.