Scripting

 From:  Martin (MARTIN3D)
7238.21 In reply to 7238.20 
Here's an example that works:

code:
frame = moi.vectorMath.createTopFrame();
frame.origin = moi.vectorMath.createPoint( 0, 0, 0 );
factory = moi.command.createFactory( 'cylinder' );
factory.setInput( 1, frame );
factory.setInput( 3, 100 ); //diameter
factory.setInput( 4, moi.vectorMath.createPoint( 0, 0, 300 ) ); //length
factory.commit();


You must be more specific where you create the frame (Top, Bottom, Left ...) and you must give the factory two points for the cylinder direction not just the height.


-Martin

EDITED: 19 Apr 2015 by MARTIN3D