*modent_addcontentsbyids

Adds entities to a modular entity via IDs.

Syntax

*modent_addcontentsbyids modular_entity_type modular_entity_id content_entity_type content_entity_ids representation_key

Type

HyperMesh Tcl Modify Command

Description

Adds entities to a modular entity via IDs. Selection by IDs is mainly useful for adding include entities, which cannot be selected by mark.

When modular entity is subsystem, only one include entity can be associated with it. Also, if an include entity is already associated with a subsystem, it cannot be re-associated with another subsystem.

Inputs

modular_entity_type
The type of modular entity to update. Valid values are subsystemconfigurations, subsystems and subsystemsets.
modular_entity_id
The ID of the modular entity to update.
content_entity_type
The type of entity to add.
content_entity_ids
A quoted list of the entity IDs to add. If modular_entity_type is subsystem and content_entity_type is include, only one content_entity_id can be used.
representation_key
The representation key of the subsystem to populate. This defaults to the only realized representation and can be omitted.

Examples

To add the contents of include ID 4 to subsystem ID 2:
*modent_addcontentsbyids subsystems 2 includes "4"

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

2020

2022.2 – Only one includefile entity can be associated with a subsystem.