*swapcards

Swaps the card image of an entity.

Syntax

*swapcards entity_type mark_id ?target_card_image?

Type

HyperWorks Tcl Query Command

Description

Swaps the card image of an entity. This command is used to swap the card image of selected contact entities specific to the supported solver profile and retain master and slave entities.
Note:
  • In OptiStruct, it is used to swap groups CONTACT and TIE.
  • In Samcef, it is used to swap groups MCT and STI. New master and slave entities are created on swapping based on the entity types supported specific to element type and contact type.

Inputs

entity_type
The type of entity to update. Must be set to groups.
mark_id
The ID of the mark containing the groups to update. Valid values are 1 and 2.
target_cardimage
The target card image to which the entity need to be swapped. If not specified, a default mapping is done.

Example

To swap Samcef MCT contacts with IDs 1 and 2:

*createmark groups 1 1 2
*swapcards groups 1

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

14.0.130