Get lengths of all selected curves and copy to clipboard

Next
 From:  Mindset (IGNITER)
11875.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);

Moi Bueno
MindSet

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
11875.2 
Cool variation of the Details Button when you have selected something! ;)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  stefano (LIGHTWAVE)
11875.3 In reply to 11875.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

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All