num_elements#
- Part.num_elements() dict #
Get the number of elements of a given type in the current part.
- Returns:
dict
A dictionary with keys being the element type and the values being the number of such elements. Element types with zero elements are not included in the dictionary.
Examples
>>> part = reader.parts()[0] >>> elements = part.elements() >>> for etype, count in elements.items(): ... print(libuserd.ElementType(etype).name, count)