*createandmanagesetsandcontents
Creates a hierarchy of set entities to include all entities on a given mark according to set creation rules specified in a configuration file.
Syntax
*createandmanagesetsandcontents mark=<mark_id> file=<value> ?<option1>=<value1>? ?<option2>=<value2>? ... ?<optionN>=<valueN>?
Type
HyperMesh Tcl Modify Command
Description
This command accepts entities of multiple types on a mark and a configuration file. Using the rules specified in the configuration file, it creates a single hierarchy of set entities that include all entities supplied through the input mark.
Inputs
- mark=<mark_id>
- The ID of a mark containing all entities to be included in the resulting set hierarchy. Valid values are 1 and 2.
- file=<value>
- The path of the configuration file that specifies how a set hierarchy can be created using the supplied entities. Configuration files can be found in the installation folder <HW_INSTALLATION_ROOT>/hwdesktop/templates/defaults/<SOLVER_PROFILE>/entitysetrules.
- condense=<value>
- comps - If all nodes/elements of a component are in the input mark, the resulting set hierarchy is comprised of components instead of individual nodes/elements.
- create_setsegment_by_topology=<value>
- 1/yes/true - The shell/solid elements and a few element face nodes on the supplied mark are used to create set segment entities containing shell/solid faces using the topology generator.
- force_rename=<value>
- 1/yes/true - If the auto-generated name of a new child set entity matches that of an existing one, the existing set entity is re-used, where the existing contents of the child set entity are replaced by new ones.
- id=<value>
- The ID of an existing set entity. When specified, this argument results in the reuse of the specified set entity, where its existing contents are replaced by new ones. The specified set entity is the base of the hierarchy with possible child set entities. If both name and id options are specified, the first option in the argument list is ignored.
- keep_unused=<value>
- 1/yes/true - If an existing base set entity was provided for reuse by either name or id, and after creating the set hierarchy, a set entity that was previously a child of the base set entity is no longer referred to by another entity in the model; those children set entities are kept.
- name=<value>
- The name of an existing set entity or of a new set entity that is the base of the hierarchy with possible child set entities. If a set entity of the specified name already exists, this argument results in the reuse of the specified set entity, where its existing contents are replaced by new ones. If both name and id options are specified, the first option in the argument list is ignored.
- reversenormal=<value>
- The reversenormal flag required by the topology generator for creating set segment entities containing solid faces or shell edges. Valid values are 1/yes/true or 0/no/false (default).
- topology_face_angle=<value>
- The face angle required by the topology generator for creating set segment entities containing solid faces or shell edges (default = 30).
Examples
To create a set hierarchy containing all elements in the model with a base set named
“Set_elems”:
*createmark elems 1 all
*createandmanagesetsandcontents mark=1 file="contact_surface.xml" name="Set_elems" condense=none force_rename=1 keep_unused=0
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
2021.2