Model.hm_controlcardattributedefined#

Model.hm_controlcardattributedefined(cardName, attribute)#

Returns 1 if an attribute exists, 0 otherwise.

Parameters:
  • cardName (hwString) – The name of the control card.

  • attribute (hwString) – The name of the queried attribute in the control card.

Returns:

  • hwReturnStatus - Status object

  • HmQueryResult - Result object containing the output values:

    • attribute (int)

      1 - if an attribute exists

      0 - otherwise

Example#

Check if attribute exists in control card with name “ CTRL_VERSION “#
import hm
import hm.entities as ent

model = hm.Model()

_, result = model.hm_controlcardattributedefined(
  cardName="CTRL_VERSION",
  attribute="Value"
)

print("Attribute: ", result.attribute)