Model.CE_AddLinkEntitiesWithDetails#
- Model.CE_AddLinkEntitiesWithDetails(connector_collection, entity_collection, entity_state, ce_rules, ce_le_rule, tolerance_flag, tolerance, num_ents, ce_delete_links=0, ce_spot_extralinknum=0, ce_seam_extralinknum=0)#
Updates connectors at the specified locations with rules and other details.
- Parameters:
connector_collection (Collection) – The collection containing the connector entities to update.
entity_collection (Collection) – The collection containing the entities to use as links.
entity_state (unsigned int) –
The state of the link entities. Valid values are:
0 - Geometry.
1 - Elements.
ce_rules (unsigned int) –
Flag indicating when to make the links. Valid values are:
0 - Now.
1 - At realize.
ce_le_rule (unsigned int) –
Flag indicating how to make the links. Valid values are:
0 - None.
1 - Use ID.
2 - Use name.
tolerance_flag (unsigned int) –
Flag indicating whether to use the default tolerance. Valid values are:
0 - Use default.
1 - Use specified value.
tolerance (double) – Used to add entities only within the given tolerance from the specified connector.
num_ents (int) – Number of entities to add/update connector (connectors thickness (2T, 3T, etc.) value).
ce_delete_links (int) – Delete existing connector links.
ce_spot_extralinknum (int) – The number of extra links for spot connectors.
ce_seam_extralinknum (int) – The number of extra links for seam connectors.
Example#
Update links for spot connector with ID 1 and seam connector with ID 2 by deleting existing links first#import hm import hm.entities as ent model = hm.Model() model.CE_AddLinkEntitiesWithDetails( connector_collection=hm.Collection(model, ent.Connector, [1, 2]), entity_collection=hm.Collection(model, ent.Component, [21, 23, 24, 27]), entity_state=1, ce_rules=1, ce_le_rule=0, tolerance_flag=0, tolerance=0.0, num_ents=2, ce_delete_links=1, ce_spot_extralinknum=1, ce_seam_extralinknum=0, )