Model.hm_getsolverkeywordinfoall#

Model.hm_getsolverkeywordinfoall(format=0)#

Queries all the registered solver keywords. The function always returns a dictionary of keywords against the entity type.

Parameters:

format (int) – When set to non-zero value, the keywords will be sorted based on priorities identified and registered in the solver browser folder.

Returns:

  • hwReturnStatus - Status object

  • HmQueryResult - Result object containing the output values:

    • keywordinfo (HmQueryResultList) - Result list object containing HmQueryResult objects with the following output data:

      • entitytype (str) - The type of the entity for which the keywords are registered.

      • keywords (list of strings) - The list of keywords registered for the entity type.

Examples#

Querying keywords#
import hm
import hm.entities as ent

model = hm.Model()

_, result = model.hm_getsolverkeywordinfoall()

for info in result.keywordinfo:
    print("Entity Type:", info.entitytype)
    print("Keywords:", info.keywords)
Querying keywords with priority ordering#
import hm
import hm.entities as ent

model = hm.Model()

_, result = model.hm_getsolverkeywordinfoall(format=1)

for info in result.keywordinfo:
    print("Entity Type:", info.entitytype)
    print("Keywords:", info.keywords)