Go to: Synopsis. Return value. Flags. MEL examples.

Synopsis

arclen [-constructionHistory boolean] curve

arclen is undoable, queryable, and editable.

This command returns the arclength of a curve if the history flag is not set (the default). If the history flag is set, a node is created that can produce the arclength, and is connected and its name returned. Having the construction history option on makes this command useful for expressions.

Return value

floatLength in non history mode.
stringNode name, in history mode.

In query mode, return type is based on queried flag.

Flags

constructionHistory
Long name (short name) Argument types Properties
-constructionHistory(-ch) boolean create
Turn the construction history on or off (where applicable).

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

arclen curve1;
// This command returns a float value that is the length of curve1 in
// the current linear units.

string $curveInfoNode = `arclen -ch on curve1`;
expression -s ("surface1.sx = " + $curveInfoNode + ".arcLength");
// The first command produces a curve info node for curve1 and returns
// the name of the curve info node.  The second command shows how the
// arc length attribute of the curve info node can be used to set up
// an expression, ie. it drives one of the scale factors of surface1.