Tcl command that retrieves the x component of a force of ID 12 defined in the global system:
set force_x [hm_getvalue loads id=12 dataname=comp1]
To retrieve the node that load 12 is applied to:
set node_id [hm_getvalue loads id=12 dataname=node.id]
To retrieve the y coordinate of the node that load 12 is applied to:
set node_id [hm_getvalue loads id=12 dataname=node.y]
To retrieve the load collector name that contains load 12:
set loadcol_name [hm_getvalue loads id=12 dataname=collector.name]
There is no data name associated with a component collector to get the material name, only the material ID:
set matID [hm_getvalue comps id=12 dataname=materialid]
A second command would then be required to get the name of the material with that ID:
set matName [hm_getvalue mats id=$matID dataname=name]
Alternatively, the component collector has a material pointer data name. From this pointer, any valid material data name can be substituted by separating the pointer and the new data name with a period (.)
set matName [hm_getvalue comps id=12 dataname=material.name]
If a command is run on a pointer without the proper specification, HyperWorks Desktop issues the error message field statement references a pointer.
set matName [hm_getvalue comps id=12 dataname=material]
HyperWorks Desktop can’t output the correct value because material points to a material entity that has many different printable values. To print the material name, reference the pointer as “material.name”. Again, a period separates the data name material and the data name name.
Recent Comments