MoI discussion forum
MoI discussion forum

Full Version: Get lengths of all selected curves and copy to clipboard

From: Mindset (IGNITER)
28 Dec 2025   [#1]
/* Get lengths of all selected curves and copy to clipboard */
var crv_list = moi.geometryDatabase.getSelectedObjects().getCurves(); var result = '';
for (var i = 0; i < crv_list.length; i++) {
var crv = crv_list.item(i);
var len = crv.getLength();
result += moi.ui.formatCoordinate(len) + '\n';
} moi.copyTextToClipboard(result);
From: Frenchy Pilou (PILOU)
28 Dec 2025   [#2]
Cool variation of the Details Button when you have selected something! ;)
From: stefano (LIGHTWAVE)
8 May   [#3] In reply to [#2]
updated this script a bit...




> now gives pop up result and shows mulitple units mm / cm / metres
> lists named objects if they are named
> copies to clipboard
> formats good for excel







"CurveLength.js" attached.

ScriptName: CurveLength

Attachments:
CurveLength.js

Image Attachments:
MOI3d_CurveLengths1.jpg  MoI_3_CurveLength_Named.png