Model.CE_AddLinkEntitiesWithXYZs#
- Model.CE_AddLinkEntitiesWithXYZs(connector_collection, entity_collection, entity_state, ce_rules, ce_le_rule, locator, xyz_array)#
Updates connectors as group links with criteria.
- 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 - During realization by proximity.
ce_le_rule (unsigned int) –
Flag indicating how to make the links. Valid values are:
0 - None.
1 - Use ID.
2 - Use name.
locator (unsigned int) –
Flag that indicates how to use the XYZs. Valid values are:
1 - Do projection.
2 - Find closest node.
3 - Find node at XYZ.
xyz_array (hwDoubleList) – The list of the XYZ locating coordinates.
Example#
Add components with IDs 1 and 2 as a group link to connectors with IDs 1-3, using (1.0, 2.5, 3.0) and (2.0, 3.0, 0.5) as locating coordinates. The link state is “elem”, make link now, link rule is “use ID”, and the locator is to use projection#import hm import hm.entities as ent model = hm.Model() model.CE_AddLinkEntitiesWithXYZs( connector_collection=hm.Collection(model, ent.Connector, [1, 2, 3]), entity_collection=hm.Collection(model, ent.Component, [1, 2]), entity_state=1, ce_rules=0, ce_le_rule=1, locator=1, xyz_array=[1.0, 2.5, 3.0, 2.0, 3.0, 0.5], )