Average element size is calculated as follows through command hm_getaverageelemsize:
QUAD elements: average size of one element = sqrt(1/2 * (longest diagonal) * (sum of the parallel altitudes))
TRIA elements: average size of one element = sqrt(area)
# The total average size is then calculated by summing each average size and dividing by the number of elements considered.
# Value is rounded to 3 digits. Change parameter 3 of command to 1 to deactivate rounding.

hm_getaverageelemsize mark_id ?panel_sensitive? ?round?

# mark_id = The ID of the mark containing the shell elements.
# panel_sensitive = can be used when multiple panel levels have been pushed, either using the shortcut function keys, or the hm_pushpanel command. This option determines whether to use the
# current panel or the previous panel for the operation. This option is relevant only when the mark has been created from a panel entity selector under the above conditions. Valid options are:
# panel_sensitive = 0 – Use the previous panel.
# panel_sensitive = 1 – Use the current panel (default).
# round_to = 0 – Round up to 3 significant digits (default).
# round_to = 1 – Do not round.

To get the average element size for elements 1-200:

*createmark elems 1 1-200
set elem_average [hm_getaverageelemsize 1 1 0]
puts "Average element size = $elem_average"