Model.hm_getincludes#

Model.hm_getincludes(mode='')#

Returns a list of include IDs or names. If no argument is specified, the IDs are returned.

The IDs and names are returned in the same order.

Parameters:

mode (hwString) –

The query mode. Valid values are:

-byshortname

Returns the list of includes by their short names.

-byfullname

Returns the list of includes by their full path names.

-byshortnameexportpair

Returns the list of includes by their short names, along with the export flag for each.

-byshortnamesolverflagpair

Returns the list of includes by their short names, along with the solver flag for each.

-byshortnamealwaysmergeflagpair

Returns the list of includes by their short names, along with the always merge flag for each.

Returns:

  • hwReturnStatus - Status object

  • HmQueryResult - Result object containing the output values:

    • Keys valid for mode="-byfullname"

      • includeList (list of strings)

    • Keys valid for mode="-byshortname"

      • includeList (list of strings)

Examples#

Get the list of include IDs#
import hm
import hm.entities as ent

model = hm.Model()

_, result = model.hm_getincludes()

print("includeList", result.includeList)
Get the list of include short names#
import hm
import hm.entities as ent

model = hm.Model()

_, result = model.hm_getincludes(mode="-byshortname")

print("includeList", result.includeList)