Model.CE_ConnectorsUpdateByMetadata#

Model.CE_ConnectorsUpdateByMetadata(connector_collection, md_link_type='', md_link='', md_connector_type='', md_isoprocess_type='')#

Extracts link and other information from the connector location entity, the parent part and its child components and applies it on the connector.

Parameters:
  • connector_collection (Collection) – The collection containing the input connector entities.

  • md_link_type (hwString) – The entity link type and relink rule used for adding links using metadata extraction. Supported values are “Part UID” (default), “Part Name”, and “Property ID”.

  • md_link (hwString) – The name of metadata used for extracting the connector links. The default value is “Connected Part”. The extraction is done for all metadata names beginning with the specified value.

  • md_connector_type (hwString) – The name of metadata used for extracting the connector type. The default value is “Connector Type”.

  • md_isoprocess_type (hwString) – The name of metadata used for extracting the ISO Process type. The default value is “ISO Process Type”.

Examples#

Extract part links from metadata and relink through UID rule with link metadata as “Connected Part” on connectors with IDs 1-20#
import hm
import hm.entities as ent

model = hm.Model()

model.CE_ConnectorsUpdateByMetadata(
    connector_collection=hm.Collection(model, ent.Connector, list(range(1, 21))),
    md_link_type="Part UID",
    md_link="Connected Part",
)
Extract property links from metadata and relink through ID rule with link metadata as “Connected Part”, iso process type as “ISO Type” on connectors with IDs 1-20#
import hm
import hm.entities as ent

model = hm.Model()

model.CE_ConnectorsUpdateByMetadata(
    connector_collection=hm.Collection(model, ent.Connector, list(range(1, 21))),
    md_link_type="Part UID",
    md_link="Connected Part",
    md_isoprocess_type="ISO Type",
)