*AE_AttachmentCreateWithOptions
Creates attachments with options.
Syntax
*AE_AttachmentCreateWithOptions target_entity_type target_mark_id location_entity_type location_mark_id search_type string_array number_of_strings
Type
HyperMesh Tcl Modify Command
Description
Creates attachments with options.
Inputs
- target_entity_type
- The target entity type to consider for adding attachments. Valid values are parts and comps.
- target_mark_id
- The ID of the mark containing the target entities. Valid values are 1 and 2.
- location_entity_type
- The location entity type to use for determining the attachment location (one attachment per location). Valid values are nodes. This is optional if doing a hole search.
- location_mark_id
- The ID of the mark containing the location entities. Valid values are 1 and 2.
- search_type
- Hole - If nodes are passed in via location_mark_id, attempt to find a single hole per node. If no nodes are passed, create an attachment for each hole found on entities in target_mark_id.
- string_array
- The ID of the array created using *createstringarray, which
contains the additional input strings. Must be set to 1. Valid strings are:
- attachmentcontrol=<id>
- The ID of the attachment control to use for realization.
- maxdiameter=<value>
- The maximum hole diameter to find.
- mindiameter=<value>
- The minimum hole diameter to find.
- tolerance=<value>
- The tolerance used for hole searches and projections.
- number_of_strings
- The number of strings in string_array.
Examples
Create an attachment for each location entity (nodes 266 and 380), looking for the nearest hole on Part1 or Part2 for each node:
*createmark modules 1 "Part1" "Part2"
*createmark nodes 1 266 380
*createstringarray 4 "mindiameter=5" "maxdiameter=25" "tolerance=25" "attachmentcontrol=1"
*AE_AttachmentCreateWithOptions modules 1 nodes 1 "Hole" 1 4
Create attachments for each hole on 3 different parts, specifying an attachment control be created:
*createmark modules 1 "Part1" "Part2" "Part3"
*createstringarray 4 "mindiameter=5" "maxdiameter=25" "tolerance=25" "attachmentcontrol=1"
*AE_AttachmentCreateWithOptions modules 1 nodes 0 "Hole" 1 4
Create two node attachments (nodes 221 and 365), referencing specific nodes with no other realization:
*createmark nodes 1 221 365
*AE_AttachmentCreateWithOptions modules 0 nodes 1 "Node" 1 0
Errors
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
2020