Model.copytoclipboard#
- Model.copytoclipboard(collectionset, componentrule='COMP_ONLY', holderrule='', includefileids=hwIntList(), includefilerule='IGNORE', referencerule='RESET')#
Copies entities to the HyperMesh clipboard.
- Parameters:
collectionset (CollectionSet) – The set of collections containing possibly multiple type of entities to be copied.
componentrule (hwString) –
The rule for components.
COMP_ONLY - Copy the component only.
FE - Copy the FE entities inside the component.
GEOM - Copy the geometry entities inside the component.
FE_AND_GEOM - Copy both the FE and geometry entities inside the component.
holderrule (hwString) –
The rule for entities that contain other entities.
ASSEMBLY - Also copy the assemblies and components that an assembly holds.
CONFIGURATION - Also copy the parts, partsets and configurations that a configuration holds.
PARTSET - Also copy the parts, partsets and partassemblies that a partset holds.
PARTASSEMBLY - Also copy the parts and partassemblies that a partassembly holds.
SUBSYSTEMCONFIGURATION - Also copy the subsystemconfigurations, subsystemsets and subsystems that a subsystemconfiguration holds.
SUBSYSTEMSET - Also copy the subsystemsets and subsystems that a subsystemset holds.
LOADCOL - Also copy the loads that a loadcolr holds.
SYSTEMCOL - Also copy the systems that a systemcol holds.
BEAMSECTCOL - Also copy the beamsects that a beamsectcol holds.
VECTORCOL - Also copy the vectors that a vectorcol holds.
LAMINATE - Also copy the plies that a laminate holds.
ALL - Enforce all the above.
includefileids (hwIntList) – The ID or the list of IDs of include files to be explicitly copied together with their related entities. If this argument is present,
includefileruleis ignored.includefilerule (hwString) –
The rule for include files.
IGNORE - Ignore include files and do not copy them.
COPY - Copy include files together with the hierarchy.
referencerule (hwString) –
The rule for references.
RESET - Reset all references.
COPY_UNDEFINED - Copy references as undefined.
COPY_UNRESOLVED - Copy references as unresolved.
COPY_BOTH - Copy references both as undefined and unresolved.
Example#
Copy all entities in the collectionset to clipboard with component option only FE, copy references, ignore include files and enforce all the holderrule options#import hm import hm.entities as ent model = hm.Model() elements_collection = hm.CollectionByInteractiveSelection(model, ent.Element) CollectionSet = hm.CollectionSet(model) CollectionSet.set(elements_collection) model.copytoclipboard( collectionset=CollectionSet, componentrule="FE", referencerule="COPY", includefilerule="IGNORE", holderrule="ALL", )