Model.hm_modent_getconstraintruleoptions#

Model.hm_modent_getconstraintruleoptions()#

Returns a list of options that control the behavior of add/move/remove operations for a subsystem entity. Valid entity combinations are:

Independent Entity Types

Dependent Entity Types

beamsectcols

beamsects

components

elements

components

materials

components

nodes

components

properties

loadcols

loads

materials

curves

properties

materials

systcols

systems

vectorcols

vectors

Returns:

  • hwReturnStatus - Status object

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

    • independent_type (EntityFullType)

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

      • dependent_type (EntityFullType)

      • constraint_rule_options (EntityFullType) (HmQueryResult)-Result object with the following output data:

      • add_move_remove (unsigned int) - has values 0 (false) and 1 (true)

      • add_move_remove_shared (unsigned int) - has values 0 (forbid whole action), 1 (do not move shared), or 2 (move shared)

Example#

Get the options that control the behavior of add / move / remove operations for a subsystem entity#
import hm
import hm.entities as ent

model = hm.Model()

_,resultList = model.hm_modent_getconstraintruleoptions()

for result in resultList:

    print("independent_type", result.independent_type)
    infoList = result.dependent_info

    for info in infoList:

        print("dependent_type", info.dependent_type)
        constrain = info.constraint_rule_options
        print("add_move_remove", constrain.add_move_remove)
        print("add_move_remove_shared", constrain.add_move_remove_shared)