Finding Length of Curves?

 From:  Michael Gibson
5496.10 In reply to 5496.9 
Hi Martin,

> I am getting syntax error with the CurveLengthBeingDrawn script in v3 Beta, anybody else have this working
> and can offer any help. I set it in shortcuts as Ctrl+L

It seems to be working ok for me in the Sep-1 v3 beta.

Are you possibly using an older version of the script? The one I'm testing with is this one here:

code:
script: /* Show length of current curve being drawn */ try { moi.ui.commandUI.setInterval( 'var crvs = moi.geometryDatabase.getObjects().getCurves(); var len = 0.0; if ( crvs.length > 0 ) { len = crvs.item(crvs.length-1).getLength(); } if ( !window["_crvdistlabel"] ) { document.body.insertAdjacentHTML( "beforeEnd", "<div id=_crvdistlabel></div>" ); } _crvdistlabel.innerText = len.toFixed(4);', 250 ); } catch(e) {}


Also you should trigger it only after you have started to draw the curve.

- Michael