Scripting

 From:  dune1982
7238.9 In reply to 7238.8 
Hello Michael,
this is what works so far:

function drawLine(x1,y1,z1,x2,y2,z2)
{
var linefactory = moi.command.createFactory( "line" );
linefactory.setInput( 0, moi.vectorMath.createPoint( x1, y1, z1 ) );
linefactory.setInput( 1, moi.vectorMath.createPoint( x2, y2, z2 ) );
linefactory.commit();
}

drawLine(0,0,0,10,0,0);
drawLine(10,0,0,10,10,0);
drawLine(10,10,0,0,0,0);

moi.selection.setFilter( 'Types', 'Curves', true );
var objects = moi.geometryDatabase.selectAll();
moi.selection.clearSelectionFilters();

Now I need the stuff from the network.js, but I don't want any manual input.

This is what i took from network.js

var objectpicker = moi.ui.createObjectPicker();
objectpicker.allowCurves();

var objects = objectpicker.objects;
objects.sortBySelectionOrder();

var factory = moi.command.createFactory( 'network' );
factory.setInput( 0, objects );

moi.ui.bindUIToInput( 'mode', 'value', factory.getInput(4) );
factory.commit();

There is no meaning to this script, I'm just trying to understand.