Model.CE_MarkCombineLinks#
- Model.CE_MarkCombineLinks(collection, search_type, search_rule, update_state, search_string_array, keep_realized=0)#
Combines the individual/group links into a single group link.
- Parameters:
collection (Collection) – The collection containing the connector entities to combine
search_type (EntityFullType) – The specific link type to search in the connector.
search_rule (unsigned int) –
The rule by which the link entity was added to the connector:
0 - Undefined
1 - None
2 - Use ID
3 - Use Name
4 - Proximity
5 - Use UID
update_state (unsigned int) –
The update state of the links desired to be grouped:
0 - Undefined
1 - Elems
2 - Geom
search_string_array (hwStringList) – A string array containing the list of of link IDs/names/UIDs need to be combined into a group. The strings are generally IDs/names/UIDs based on the
search_rule.keep_realized (unsigned int) –
Option to keep the current connector state after the update operation:
0 - Unrealize if needed (default)
1 - Keep current state
Example#
Combine the component link with IDs 1,2,3 and 4 of the connector with IDs 2 and 5 into a group link#import hm import hm.entities as ent model = hm.Model() connectors = hm.Collection(model, ent.Connector, [2, 5]) model.CE_MarkCombineLinks( collection=connectors, search_type=ent.Component, search_rule=1, update_state=2, search_string_array=["1", "2", "3", "4"], keep_realized=0 )