Model.hm_info_currentcollector#

Model.hm_info_currentcollector(entity_type)#

Returns the current collector entity of the specified type or None if no collector is current.

Parameters:

entity_type (EntityFullType) – The entity class for which to return the current collector. Valid entity types are beamsectcol, component, loadcol, part, systcol, and vectorcol.

Returns:

  • hwReturnStatus - Status object

  • HmQueryResult - Result object containing the output values:

    • current_collector (Entity) - The entity object representing the current collector.

Example#

Get the current load collector#
import hm
import hm.entities as ent

model = hm.Model()

_, result = model.hm_info_currentcollector(ent.Loadcol)

print("Current loadcol ID:", result.current_collector.id if result.current_collector else None)