*createmark

Places entities on a mark based on user-supplied options.

Syntax

*createmark entity_type mark_id "?option?" list

Type

HyperMesh Tcl Modify

Description

This command will place entities of entity_type onto mark_id. Valid mark_ids are 1 and 2. Depending on the options specified, the supported entity_types will change.

All options only return entities that are defined as active in the database, unless otherwise noted.

If no ?option? is specified, "by name only" is used for entities with names. Otherwise, "by id only" is used. This can be specified using the command hm_marksearchmode.

If no ?option? is specified, both active and inactive entities may be selected.

For options that allow both "ids or names" in the list, entities are found first using names. Entities not found using names are then found using IDs. This order can be specified using the command hm_marksearchmode.

When specifying entity names that contain spaces, group the name using brackets, {Comp name with spaces}, or use a Tcl list.

When specifying the list using a Tcl variable, the eval Tcl command must precede the *createmark command (see example below). This expands (substitutes) the Tcl list before executing the command. It is also important to use brackets around any options that contain spaces when using eval (eval *createmark solids 1 {"by comp name"} $comp_names). Otherwise, the quotes will be expanded before the option reaches the *createmark command and it will not function as expected.

Negative values can be used to find recently created entities (see example below). This functionality selects entities in the reverse order they are stored in the database (the order they are created, regardless of ID). However, any operations that affect the order of entities in the database (organize, reorder, etc.) will change the returned/selected entities. It is recommended to use this option only immediately after entity creation and before any other operations that may modify the database.

Inputs

entity_type
Entity type to use. Depending on the options specified, the supported entity types will change.
mark_id
The ID of the mark. Valid values are 1 and 2.
"?options?"

Supported Options

"all"
Place all entities on mark_id.
"displayed"
Place all entities on mark_id.
"inactive"
Place all entities on mark_id.
"retrieve"
Place saved entities on mark_id. Some panels allow you to save entities. See the *saveusermark command, as well.
"reverse"
Entities existing on mark_id are removed. All other entities are put on mark_id.
"by all nodes" id
Place elements on mark_id that consist of all the listed node IDs.
"by assem" ids or names
"by assem id" ids
"by assem name" names
"by assembly" ids or names
"by assembly id" ids
"by assembly name" names
Place entities on mark_id, if they are referenced by the listed assembly IDs or names.
"by attribute" attribute
Place entities on mark_id, if they have the specified attribute name/ID.
"by block" ids or names
"by block id" ids
"by block name" names
Place entities on mark_id, if they are displayed within the bounds of the listed block IDs or names. The smaller of the global node tolerance, or 1/200 of the smallest block dimension, is used for the selection tolerance.
"by box" x0 y0 z0 x1 y1 z1 syst location contained all tol
Place entities on mark_id, if they are inside/outside/on the boundary of the box.
  • x0 – lower bound x coordinate.
  • y0 – lower bound y coordinate.
  • z0 – lower bound z coordinate.
  • x1 – upper bound x coordinate.
  • y1 – upper bound y coordinate.
  • z1 – upper bound z coordinate.
  • syst – the ID of a local coordinate system to which the coordinate bounds are relative to. If 0, the global axes are used.
  • location – The location of the entities to find, relative to the shape. Valid values are inside, outside, boundary and acrossboundary.
  • contained – A flag that indicates whether the entire entity should meet the location criteria (1) or just any part of the entity (0) to be selected.
  • all – A flag that indicates whether all entities (1) or only displayed entities (0) are considered for selection.
  • tol – The tolerance to use. In most cases, this should be set to 0.
This is currently supported for nodes, elements, connectors, components (FE and connectors only), loads, equations, loadcols, systems, systcols, vectors, vectorcols, blocks, groups, sets and contactsurfs.
"by box entity" ids or names
"by box entity id" ids
"by box entity name" names
Place entities on mark_id, if they are displayed within the bounds of the listed box IDs or names. The smaller of the global node tolerance, or 1/200 of the smallest block dimension, is used for the selection tolerance.
"by card image name" name
Place entities on mark_id if they have the specified card image name assigned to them. One name can be specified per call.
"by card image type" type
Place entities on mark_id if they have a card image assigned to them of the specified card image type. One type can be specified per call. Currently supported for mats and props.
"by collected config" configs
Place entities on mark_id if they contain entities of the specified config.
Valid configs for components are: mass, plot, weld, rigid, spring, joint, rigidlink, rbe3, bar, bar2, rod, bar3, gap, tria3, quad4, tria6, quad8, master3, master4, slave3, slave4, slave1, tetra4, penta6, hex8, tetra10, penta15, hex20, pyramid5, and pyramid13.
Valid configs for loadcols are: force, moment, constraint, pressure, temperature, flux, velocity, acceleration, and equation.
"by collected config type" config ?type1? ?type2? ?…?
Place entities on mark_id if they contain entities of the specified config and type. One config can be specified per call, with multiple optional types. The types listed must match the types found in the current template (the type name does not have to match upper/lower case). If there is no current template, no entities will be marked.
Valid configs for components are: mass, plot, weld, rigid, spring, joint, rigidlink, rbe3, bar, bar2, rod, bar3, gap, tria3, quad4, tria6, quad8, master3, master4, slave3, slave4, slave1, tetra4, penta6, hex8, tetra10, penta15, hex20, pyramid5, and pyramid13.
Valid configs for loadcols are: force, moment, constraint, pressure, temperature, flux, velocity, acceleration, and equation.
"by collector" ids or names
"by collector id" ids
"by collector name" names
Place entities on mark_id if they are referenced by the listed collector ids or names.
"by comp" ids or names
"by comp id" ids
"by comp name" names
"by component" ids or names
"by component id" ids
"by component name" names
Place entities on mark_id if they are referenced by the listed component ids or names.
"by comps on mark" markId
Place entities on mark_id if they are referenced by the listed components contained on markId.
"by cone" x y z i j k rb rt h location contained all tol
Place entities on mark_id if they are inside/outside/on the boundary of the cone.
  • x – base center x coordinate
  • y – base center y coordinate
  • z – base center z coordinate
  • i – x-normal, x-coordinate of a point on the cylinder axis
  • j – y-normal, y-coordinate of a point on the cylinder axis
  • k – z-normal, z-coordinate of a point on the cylinder axis
  • rb – radius at the cone base
  • rt – radius at the cone top
  • h – height. A negative value indicates the direction is opposite to the normal vector.
  • location – The location of the entities to find, relative to the shape. Valid values are inside, outside, boundary and acrossboundary.
  • contained – A flag that indicates whether the entire entity should meet the location criteria (1) or just any part of the entity (0) to be selected.
  • all – A flag that indicates whether all entities (1) or only displayed entities (0) are considered for selection.
  • tol – The tolerance to use. In most cases, this should be set to 0.
This is currently supported for nodes, elements, connectors, components (FE and connectors only), loads, equations, loadcols, systems, systcols, vectors, vectorcols, blocks, groups, sets and contactsurfs.
"by config" configs
Place entities on mark_id if they are of the specified config.
All element and load config names/IDs are valid.
"by config type" displayed_flag config ?type1? type2? ?…?
Place entities on mark_id if they are of the specified config and type(s). One config can be specified per call, with multiple optional types. The types listed are the type name(s) and must match the types found in the current template (the type name does not have to match upper/lower case). If there is no current template, no entities will be marked.
If displayed_flag is 1, only displayed entities will be considered. Otherwise, all entities will be searched.
All element and load config names/IDs are valid.
"by cylinder" x y z i j k r h location contained all tol
Place entities on mark_id if they are inside/outside/on the boundary of the cylinder.
  • x – base center x coordinate
  • y – base center y coordinate
  • z – base center z coordinate
  • i – x-normal, x-coordinate of a point on the cylinder axis
  • j – y-normal, y-coordinate of a point on the cylinder axis
  • k – z-normal, z-coordinate of a point on the cylinder axis
  • r – radius
  • h – height. A negative value indicates the direction is opposite to the normal vector.
  • location – The location of the entities to find, relative to the shape. Valid values are inside, outside, boundary and acrossboundary.
  • contained – A flag that indicates whether the entire entity should meet the location criteria (1) or just any part of the entity (0) to be selected.
  • all – A flag that indicates whether all entities (1) or only displayed entities (0) are considered for selection.
  • tol – The tolerance to use. In most cases, this should be set to 0.
This is currently supported for nodes, elements, connectors, components (FE and connectors only), loads, equations, loadcols, systems, systcols, vectors, vectorcols, blocks, groups, sets and contactsurfs.
"by domain" ids
Place entities on mark_id if they are referenced by the listed domain ids.
Note that when selecting handles "by domain", all handles touching the domain and all those assigned to the domain will be selected.
"by elem" ids
"by elem id" ids
"by element" ids
"by element id" ids
Place entities on mark_id if they are referenced by the listed element IDs.
"by ellipsoid" ids or names
"by ellipsoid id" ids
"by ellipsoid name" names
Place entities on mark_id if they are referenced by the listed ellipsoid IDs or names.
"by group" ids or names
"by group id" ids
"by group name" names
Place entities on mark_id if they are referenced by the listed group IDs or names.
"by handle" ids
Place entities on mark_id using the following criteria:
domains - selects all domains which touch the selected handles or to which the selected handles are assigned.
handles - selects the handles linked to the selected handles by symmetry.
nodes - selects the nodes where each selected handle is located.
shapes - selects all shapes which contain a perturbation vector for the selected handles.
symmetries - selects all symmetries which link the selected handles to other handles.
"by id only" ids
Place entities on mark_id with the listed entity IDs. Some entities (such as components) can be listed by name or by ID. If you are listing by ID, use the "by id only" option. This option will select both active and inactive entities.
"by include" ids
Place entities on mark_id if they are inside the include file with ID ids.
"by include shortname" names
Place entities on mark_id if they are inside the include file with short name names.
"by laminate" ids or names
"by laminate id" ids
"by laminate name" names
Place entities on mark_id if they are referenced by the listed laminate IDs or names.
"by lines" ids
Place entities on mark_id if they are referenced by the listed line IDs.
"by material" ids or names
"by material id" ids
"by material name" names
Place entities on mark_id if they are referenced by the listed material IDs or names.
"by mbjoint" ids or names
"by mbjoint id" ids
"by mbjoint name" names
Place entities on mark_id if they are referenced by the listed mbjoint IDs or names.
"by mbplane" ids or names
"by mbplane id" ids
"by mbplane name" names
Place entities on mark_id if they are referenced by the listed mbplane IDs or names.
"by metadata name" names
Place entities on mark_id if they have associated metadata with any of the specified names. Valid for all metadata types.
"by metadata contains value" name value
Place entities on mark_id if they have associated metadata with the specified name and a value that contains value. This is valid for all metadata types.
"by metadata equal to value" name value
Place entities on mark_id if they have associated metadata with the specified name and a value that exactly matches value. This is valid for all metadata types.
"by metadata greater than value" name value
Place entities on mark_id if they have associated metadata with the specified name and a value greater than value. This is valid for date, double, entityid and int metadata types.
"by metadata less than value" name value
Place entities on mark_id if they have associated metadata with the specified name and a value less than value. This is valid for date, double, entityid and int metadata types.
"by metadata type" name value
Place entities on mark_id if they have associated metadata with the specified name and a type equal to type. This is valid for date, double, entityid and int metadata types.
"by metadata value range" name value_lower value_upper
Place entities on mark_id if they have associated metadata with the specified name and a value between or equal to value_lower and value_upper. This is valid for all metadata types (date, double, doublearray, entityid, entityidarray, int, intarray, string, stringarray).
"by module" ids or names
"by module id" ids
"by module name" names
Place entities on mark_id if they are referenced by the listed module IDs or names.
"by morph vols" ids
Place entities on mark_id if they are referenced by the listed morphvolume IDs.
"by multibody" ids or names
"by multibody id" ids
"by multibody name" names
Place entities on mark_id if they are referenced by the listed multibody IDs or names.
"by name only" names
Place entities on mark_id with the listed entity names. Some entities (such as components) can be listed by name or by ID. If you are listing by name, use the "by name only" option. This option will select both active and inactive entities..
"by node" ids
"by node id" ids
Place entities on mark_id if they are referenced by the listed node IDs.
"by outputblock" ids or names
"by outputblock id" ids
"by outputblock name" names
Place entities on mark_id if they are referenced by the listed outputblock IDs or names.
"by plot" ids or names
"by plot id" ids
"by plot name" names
Place entities on mark_id if they are referenced by the listed plot IDs or names.
"by ply" ids or names
"by ply id" ids
"by ply name" names
Place entities on mark_id if they are referenced by the listed ply IDs or names. Valid for elements, laminates, materials and sets.
"by points" ids
Place entities on mark_id if they are referenced by the listed points IDs.
"by property" ids or names
"by property id" ids
"by property name" names
Place entities on mark_id if they are referenced by the listed property IDs or names.
"by set" ids or names
"by set id" ids
"by set name" names
Place entities on mark_id if they are referenced by the listed set IDs or names.
"by solids" ids
Place entities on mark_id if they are referenced by the listed solids IDs.
"by sphere" x y z r location contained all tol
Place entities on mark_id if they are inside/outside/on the boundary of the sphere.
x – center x coordinate
y – center y coordinate
z – center z coordinate
r – radius
location – The location of the entities to find, relative to the shape. Valid values are inside, outside, boundary and acrossboundary.
contained – A flag that indicates whether the entire entity should meet the location criteria (1) or just any part of the entity (0) to be selected.
all – A flag that indicates whether all entities (1) or only displayed entities (0) are considered for selection.
tol – The tolerance to use. In most cases, this should be set to 0.
This is currently supported for nodes, elements, connectors, components (FE and connectors only), loads, equations, loadcols, systems, systcols, vectors, vectorcols, blocks, groups, sets and contactsurfs.
"by status" attribute status
Place entities on mark_id if they have the specified attribute name/ID with a status that equals the specified status. This is valid for integer, real and string attributes only.
"by surface" ids
Place entities on mark_id if they are referenced by the listed surface IDs.
"by surface on mark" markId
Place entities on mark_id if they are referenced by the listed surfaces contained on markId.
"by system" ids
"by system id" ids
Place entities on mark_id if they are referenced by the listed system IDs.
"by topology" types
Place entities on mark_id if they are of the specified type.
Multiple types can be specified. Valid types are as follows:
  • points
    • none (non-topological free point)
    • vertex
    • fixed
    • alltopo (vertex+fixed)
    • all
  • lines
    • none (non-topological free line)
    • free
    • shared
    • nonmanifold
    • suppressed
    • alltopo (free+shared+nonmanifold+suppressed)
    • all
  • surfaces
    • free (not part of a solid)
    • bounding
    • partition
    • fin
    • alltopo (bounding+partition+fin)
    • all
  • solids
    • 1dmappable
    • 3dmappable
    • unmappable
    • ignoredmappable
    • all
"by value range" attribute_or_data_name value_lower value_upper
Place entities on mark_id if they have the specified data name or attribute name/ID with a value between or equal to value_lower and value_upper. This is valid for entity, integer and real data names and attributes only.
"by visible"
Place entities on mark_id if they are visible (based on pixels). Currently only supported for elems. Not available in batch mode.
"contains value" attribute_or_data_name value value_type
Place entities on mark_id if they have the specified data name or attribute name/ID with a value that contains value. This is valid for entity, integer, real and string data names and attributes only. Tcl regular expression syntax is used to specify the value.
For entity/integer/real values, value_type should be set to 0 (default if not specified). For string values, value_type must be set to 1.
"equal to value" attribute_or_data_name value value_type
Place entities on mark_id if they have the specified data name or attribute name/ID with a value that exactly matches value. This is valid for entity, integer, real and string data names and attributes only.
For entity/integer/real values, value_type should be set to 0 (default if not specified). For string values, value_type must be set to 1.
"greater than value" attribute_or_data_name value
Place entities on mark_id if they have the specified data name or attribute name/ID with a value that is greater than (but not equal to) value. This is valid for entity, integer and real data names and attributes only.
"less than value" attribute_or_data_name value
Place entities on mark_id if they have the specified data name or attribute name/ID with a value that is less than (but not equal to) value. This is valid for entity, integer and real data names and attributes only.
"on plane" x y z i j k tol plane touching
Place entities on mark_id if they are within tol of the plane or vector defined by (x, y, z, i, j, k).
x – base x coordinate
y – base y coordinate
z – base z coordinate
i – normal x component
j – normal y component
k – normal z component
tol – tolerance to use to search for entities
If plane is 0, all entities must be within tol of the vector defined by (x, y, z, i, j, k). Otherwise, all entities must be within tol of the plane defined by (x, y, z, i, j, k).
If touching is 0, all points of the entity must touch the vector or plane. Otherwise, at least one point must touch the vector or plane. For solids, if touching is 0, no solids will be found.
tag="tag1" tag="tag2" etc.
Place entities on mark_id if they have the specified tag associated with them. Multiple tag= options can be used at once. The "tag" value can be defined in 3 ways:
  • The full name, including label and body:
    • *createmark nodes 1 tag="label1:body1" tag="label2:body2"
  • The label only, and any body:
    • *createmark nodes 1 tag="label1:" tag="label2:"
  • The body only, and any label:
    • *createmark nodes 1 tag=":body1" tag=":body2"

Examples

To delete components with names FRONT and SIDE:
*createmark comps 1 FRONT SIDE
*deletemark comps 1
To delete components with names “Name with spaces” and SIDE:
*createmark comps 1 {Name with spaces} SIDE
*deletemark comps 1
or
set names [list {Name with spaces} SIDE]
eval *createmark comps 1 $names
*deletemark comps 1
To mark the last 3 components that were created:
*createmark comps 1 -1 -2 -3
To delete all elements in the database:
*createmark elems 1 "all"
*deletemark elems 1
To delete displayed elements:
*createmark elems 1 "displayed"
*deletemark elems 1
To detach the elements (by .5) that failed the quality index (you must first use the save failed button in the quality index panel):
*createmark elems 1 "retrieve"
*detachelements 1 .5
To delete all elements except the element with ID = 10:
*createmark elems 1 10
*createmark elems 1 "reverse"
*deletemark elems 1
To set all inactive assemblies to active:
*createmark assems 1 "inactive"
*setvalue assems mark=1 activesuppressed=0
To split all elements found in assemblies with IDs 10 and 20:
*createmark elems 1 "by assem id" 10 20
*splitelements 1 1
To split all elements found in assemblies A and B:
*createmark elems 1 "by assem name" A B
*splitelements 1 1
To delete all systems in the system collector with ID 100:
*createmark systems 1 "by collector id" 100
*deletemark systems 1
To delete all loads in load collector loadcol1:
*createmark loads 1 "by collector name" loadcol1
*deletemark loads 1
To change elements in component with ID 200 to 2nd order:
*createmark elems 1 "by comp id" 200
*orderchangetosecond 1 0 0
To change elements in components named left and right to 2nd order:
set list "left right"
eval *createmark elems 1 "by comp name" $list
*orderchangetosecond 1 0 0
To place components X and Y on mark 1 and translate elements in these components by (5,0,0):
*createmark comps 1 "by name only" X Y
*createmark elems 1 "by comps on mark" 1
*createvector 1 1.0 0.0 0.0
*translatemark elements 1 1 5
To split all quad4 elements in the model:
*createmark elems 1 "by config" quad4
*splitelements 1 1
To mark all rigidlink elements that are of type RgdBody or ConNode. (The LS-DYNA template must be loaded.):
*createmark elems 1 "by config type" 1 rigidlink RgdBody ConNode
To mark elements whose component references material with ID 50 or whose property references material with ID 50:
*createmark elems 1 "by material id" 50
To mark elements that point to the property with name prop1 or, if no property is assigned to the element, whose component points to the property with name prop1:
*createmark elems 1 "by property name" prop1
To split all elements if their center is on the X-Y plane:
*createmark elems 1 "on plane" 0 0 0 0 0 1 .1 1 1
*splitelements 1 1
To get a list of the elements referenced by outputblock OPB:
*createmark elems 1 "by outputblock name" OPB
set elem_list [hm_getmark elems 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

2017.1 - Added new "by topology" method.