Dynamic component count to text file

OR… you can insert

  next if number < 1

… into the iterator block that writes the report lines:

total = 0
matches.each {|definition|
  number = definition.count_used_instances
  next if number < 1
  total += number
  attribute = definition.get_attribute(dictionary_name, 'lenz').to_l
  height = Sketchup.format_length( attribute )
  @report << format( DATALINE, definition.name, height, number )
}