Measuring Curve Lengths in HyperMesh with Tcl

Need the length of a curved line in HyperMesh — the actual arc length, not the straight-line distance between its endpoints? There’s a built-in Tcl query command for exactly that: hm_linelength.

The command

It returns the true length along the curve, correctly handling curvature — not a chord approximation. Pass it several IDs at once and it returns their summed length (each ID only counted once, even if repeated).

Measuring every line in the model

*createmark lines 1 "all" grabs every line in the database, hm_getmark pulls the IDs into a Tcl list, and the loop reports each one’s length plus a running total — optionally dumped to a CSV for a spreadsheet.

One gotcha

Some HyperMesh versions expose hm_createmark / hm_clearmark as convenience wrappers; others don’t, and you’ll hit invalid command name "hm_clearmark". The asterisk-prefixed originals — *createmark and *clearmark, used above — are the safer, universally-available choice.

Measuring a specific selection instead

Swap "all" for an interactive pick if you only want a handful of curves:

*createmarkpanel opens the standard entity-selection prompt in the modeling window and waits for you to pick curves before continuing.

Last Updated on 2026-07-30 by gantovnik

Discover more from Tips and Hints for Aerospace Engineers

Subscribe now to keep reading and get access to the full archive.

Continue reading