Model.CE_RemoveLink#
- Model.CE_RemoveLink(ce_id, option, link_entity, link_name)#
Removes a link entity of a specific type and/or ID/name from a connector entity.
- Parameters:
ce_id (unsigned int) – ID of the connector entity.
option (int) –
Specifies if all the links in the connector or a specific link needs to be removed.
0 - Remove all links in the connector.
1 - Remove the link specified by type and/or ID/name.
link_entity (Entity) – The object describing the link entity to search in the connector. Optional, if the name is specified. If link ID is not specified, the first link found with the same type defined by proximity rule is removed.
link_name (hwString) – Link name to remove from the connector. Optional, if the ID is specified. If link name is not specified, the first link found with the same type defined by proximity rule is removed.
Examples#
Remove all links from a connector entity of ID 1#import hm import hm.entities as ent model = hm.Model() model.CE_RemoveLink( ce_id=1, option=0, link_entity=None, link_name="" )
Remove the component with ID 10 from the connector with ID 1#import hm import hm.entities as ent model = hm.Model() model.CE_RemoveLink( ce_id=1, option=1, link_entity=ent.Component(model, 10), link_name="" )