Scripting

 From:  Michael Gibson
7238.11 In reply to 7238.9 
Hi dune1982, so your example failing not because network needs more inputs set on it, but because your object list is empty.

That's because the object picker is really meant for user interactive object picking - objectpicker.objects will only be populated if you call GetObject( objectpicker ) , which can return immediately though if there are preselected objects.

If you just want to grab the current selected objects rather that waiting with an event loop where the user could modify the selection, you don't need to use the object picker you could instead call moi.geometryDatabase.getSelectedObjects(). Similarly if you want to get all curves you don't need to do it by selection you can do moi.geometryDatabase.getObjects().getCurves()

But anyway instead of grabbing all curves you probably should only grab the specific lines that you are creating, see the attached file for a demo of that.

Hope this helps!

- Michael
Attachments: