Scripting

 From:  wastzzz
7238.12 In reply to 7238.11 
Anyone could post an example of the offset command via script?
I am trying to make an offset of a line I have calculated but I can't get it to work.
Any help would be appreciated..


[...]
var factory = moi.command.createFactory( 'line' ); //Calculating a line from previous points
factory.setInput( 0, crv.getStartPt() );
factory.setInput( 1, crv.getEndPt() );
var output = factory.calculate();

var factory = moi.command.createFactory('offset'); //Calculating the offset of line
factory.setInput( 0, output);
factory.setInput( 1, 3);
factory.commit();

M.