hm_setshapeattribute
Sets an attribute for an existing graphical shape.
Syntax
hm_setshapeattribute type index attribute value
Type
HyperMesh Tcl GUI
Description
Creates a shape in the modeling window. Returns an index to the shape, which is required to further manage the shape.
Inputs
- type
- The type of shape to update. Valid values are BOX, SEGMENT, CYLINDER, SPHERE, POLYHEDRON, and FACET.
- index
- The index of the shape, as returned from hm_createshape
- attribute
- value
- The attribute and value to update. Attributes are dependent on the dimension of the shape (1D, 2D or 3D). Valid attributes and values are:
Examples
To update a sphere with index 5 to color
12:
hm_setshapeattribute SPHERE 5 COLOR 12
To update a sphere with index 5 to be
invisible:
hm_setshapeattribute SPHERE 5 VISIBILITY 0
To update a sphere with index 5 to have a transparency of
8:
hm_setshapeattribute SPHERE 5 TRANSPARENCY 8
Errors
Incorrect usage results in a Tcl error. To
detect errors, you can use the catch
command:
if { [ catch {command_name...} ] } {
# Handle error
}