Model.mergefile2#
- Model.mergefile2(filename, connectors_checkattribute=False, connectors_layercheck=False, connectors_thicknesscheck=False, connectors_tolerance=0.0, connectors_idcheck=False, connectors_type=False, dropincomingmodulehierarchy=False, mergemode_comps='keepboth', mergemode_mats='keepboth', mergemode_props='keepboth', mergemode_sensors='keepboth', mergemode_sections='keepboth', mergemode_attachments='keepboth', mergeoffset_comps=0, respectincomingparentmodule=True, mergemode_connectors='keepboth', mergemode_geometryandmesh='keepboth', connectors_tolerancecheck=False, attachments_tolerancecheck=False, attachments_tolerance=False, attachments_idcheck=False, attachments_linkcheck=False, attachments_configcheck=False, mergemode_attachmentcontrols='keepboth', mergemode_connectorcontrols='keepboth', connectorcontrols_namecheck=False, connectorcontrols_idcheck=False, connectorcontrols_configcheck=False, attachmentcontrols_namecheck=False, attachmentcontrols_idcheck=False, attachmentcontrols_configcheck=False, mergemode_modules='keepboth', sessiondominatesonconflict=False, subsystemequivalence=0, equivalenceTolerance=0.0, mergemode_engentities='keepboth', engentities_namecheck=False, engentities_idcheck=False, engentities_configcheck=False, loadcadgeometryasgraphics=False)#
Merges (imports) the referenced HyperMesh database file (*.hm) into the current model, additionally applying Redundant Entity Management (REM). REM is supported for properties, materials, connectors, components and parts/part assemblies.
Depending on the settings, entity names or IDs in the incoming file may be renamed/renumbered with the least disruption possible.
- Parameters:
filename (hwString) – The full path and file name of the HM binary file to merge.
connectors_checkattribute (bool) – This determines if connector attributes are compared when deciding if they are the same. Possible values are
TrueandFalse.connectors_layercheck (bool) – This determines if connector layers are compared when deciding if they are the same. Possible values are
TrueandFalse.connectors_thicknesscheck (bool) – This determines if connector thicknesses are compared when deciding if they are the same.
connectors_tolerance (double) – This specifies the tolerance to use when deciding if connectors are the same.
connectors_idcheck (bool) – Reserved for future use.
connectors_type (bool) – Reserved for future use.
dropincomingmodulehierarchy (bool) – This is for special cases that need to drop any incoming module hierarchy,but keep the contents. Possible values are
True(“yes”) andFalse(“no”).mergemode_comps (hwString) – Specifies how to merge the attributes of components identified as the same.Possible values are keepexisting,*keepincoming* and keepboth. Default
mergemode_comps="keepboth".mergemode_mats (hwString) – Specifies how to merge the attributes of materials identified as the same. Possible values are keepexisting,*keepincoming* and keepboth. Default
mergemode_mats="keepboth".mergemode_props (hwString) – Specifies how to merge the attributes of properties identified as the same. Possible values are keepexisting,*keepincoming* and keepboth. Default
mergemode_props="keepboth".mergemode_sensors (hwString) – Specifies how to merge the attributes of incoming sensors identified as the same. Possible values are keepexisting,*keepincoming* and keepboth. Default
mergemode_sensors="keepboth".mergemode_sections (hwString) – Specifies how to merge the attributes of incoming sections identified as the same. Possible values are keepexisting,*keepincoming* and keepboth. Default
mergemode_sections="keepboth".mergemode_attachments (hwString) – Reserved for future use.
mergeoffset_comps (unsigned int) – Reserved for future use.
respectincomingparentmodule (bool) – This is used to guide component conflict resolution. This is necessary when an incoming component belongs to a different part,in comparison with the same component in the session. In this case the conflict is resolved either by respecting the incoming parent part or the in-session one.
mergemode_connectors (hwString) – Specifies how to merge the attributes of connectors identified as the same. Possible values are keepexisting,*keepincoming* and keepboth. Default
mergemode_connectors="keepboth".mergemode_geometryandmesh (hwString) – Specifies how to merge the contents of components identified as the same. Possible values are keepexisting,*keepincoming* and keepboth. Default
mergemode_geometryandmesh="keepboth". This option is valid only in case thatmergemode_compsis either keepexisting or keepincoming. Whenmergemode_comps=keepboth,there will be separate components anyway.connectors_tolerancecheck (bool) – Reserved for future use.
attachments_tolerancecheck (bool) – Reserved for future use.
attachments_tolerance (double) – Reserved for future use.
attachments_idcheck (bool) – Reserved for future use.
attachments_linkcheck (bool) – Reserved for future use.
attachments_configcheck (bool) – Reserved for future use.
mergemode_attachmentcontrols (hwString) – Reserved for future use.
mergemode_connectorcontrols (hwString) – Reserved for future use.
connectorcontrols_namecheck (bool) – Reserved for future use.
connectorcontrols_idcheck (bool) – Reserved for future use.
connectorcontrols_configcheck (bool) – Reserved for future use.
attachmentcontrols_namecheck (bool) – Reserved for future use.
attachmentcontrols_idcheck (bool) – Reserved for future use.
attachmentcontrols_configcheck (bool) – Reserved for future use.
mergemode_modules (hwString) – Reserved for future use.
sessiondominatesonconflict (bool) – Reserved for future use.
subsystemequivalence (unsigned int) – Reserved for future use.
equivalenceTolerance (double) – Reserved for future use.
mergemode_engentities (hwString) – Reserved for future use.
engentities_namecheck (bool) – Reserved for future use.
engentities_idcheck (bool) – Reserved for future use.
engentities_configcheck (bool) – Reserved for future use.
loadcadgeometryasgraphics (bool) – Reserved for future use.
Example#
Merge/import the file “C:/temp/Rail2.hm” to the active model (i.e. HyperMesh window), keep all incoming data.#import hm import hm.entities as ent model = hm.Model() model.mergefile2( filename="C:/temp/Rail2.hm", mergemode_props="keepincoming", mergemode_mats="keepincoming", mergemode_comps="keepincoming", mergemode_geometryandmesh="keepincoming", )