Model.CE_MarkRemoveLink#
- Model.CE_MarkRemoveLink(ce_collection, option, link_entity, link_name)#
Removes a link entity of a specific type and ID or name from the connectors on mark.
- Parameters:
ce_collection (Collection) – The collection containing the connector entities.
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 ID/name.
link_entity (Entity) – The object describing the entity to remove from connector. If link ID/name 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. This is optional, if the ID is specified.
Examples#
Remove all links from the displayed connectors#import hm import hm.entities as ent model = hm.Model() connectors = hm.CollectionByDisplayed(model, ent.Connector) model.CE_MarkRemoveLink( ce_collection=connectors, option=0, link_entity=None, link_name="" )
Remove the component with ID 10 from the displayed connectors#import hm import hm.entities as ent model = hm.Model() connectors = hm.CollectionByDisplayed(model, ent.Connector) model.CE_MarkRemoveLink( ce_collection=connectors, option=1, link_entity=ent.Component(model, 10), link_name="" )