Model.updateidrange#
- Model.updateidrange(submodel_type, id, shortname, entity_type, min_id, max_id, pool_id, integer_array)#
Updates an ID range for a submodel.
- Parameters:
submodel_type (hwString) – The type of submodel to update the ID range for. Valid values are includes and submodel. Submodel is recommended.
id (unsigned int) – The ID of the submodel. Not required if
shortnameis used.shortname (hwString) – The shortname of the submodel. Not required if
idis used.entity_type (hwString) – The type of entity to update the ID range for.
min_id (unsigned int) – The minimum ID for the range.
max_id (unsigned int) – The maximum ID for the range.
pool_id (unsigned int) – The ID of the solver pool.
integer_array (hwIntList) – The array that contains the locked IDs.
Examples#
Update an ID range for include 1 with minimum ID 1,000 and maximum ID 100,000 for components#import hm import hm.entities as ent model = hm.Model() int_list = [] model.updateidrange( submodel_type="includes", id=1, shortname="", entity_type="Component", min_id=1000, max_id=100000, pool_id=0, integer_array=int_list, )
Update an ID range for include 1 with minimum ID 1,000 and maximum ID 100,000 for components , with locked IDs 2000 and 5000#import hm import hm.entities as ent model = hm.Model() int_list = [2000, 5000] model.updateidrange( submodel_type="includes", id=1, shortname="", entity_type="Component", min_id=1000, max_id=100000, pool_id=0, integer_array=int_list, )