Dynamic component count to text file

The format method just formats data into one big long textline.
I often save the format strings as module constants and use the consant in the call using format.

Use use the format call inside a loop that iterates the array of components you have already found. Example code was in the thread:
Selecting Specific Component (or Group) By Name

In that loop you build up a text report by repeatedly appending your textlines to a string object.

path = UI::savepanel("Save Report As...","report.txt")
if path

  # Create a data format string with newline:
  DATALINE = "%-20s   (%8s)   count: %-s\n"

  dictionary_name = "dynamic_attributes"

  # Set Report Captions:
  @report = format( DATALINE, "Type", "Height", "Count" )

  # Iterate the found component definitions:
  #
  # EDIT: SEE NEXT POST <<===================<<<<<

  # Save the Report:
  File::write( path, @report )

end