From: fcwilt
Hi,
A while back you helped me to create a script to export selected objects as STL, each object to it's own file, using the object name as the file name, plus a number of other great features.
It works great, absolutely fabulous.
While I design parts in "subparts", to export them to an STL I thought I had to first union all the subparts together.
Then I recently found that selecting all of the subparts and exporting them via the File menu Export option, they ended up in one file and, as far as the slicer was concerned, they were all one big part.
That would be a useful option to add to my script.
So how does the export on multiple objects into one STL look in code?
Thanks much.
Frederick
From: Michael Gibson
Hi Frederick,
re:
> So how does the export on multiple objects into one STL look in code?
If you want it to do the same as the File > Export command you would turn on selection on all the parts that you want in the same file and then call moi.geometryDatabase.fileExport( 'filename' );
If you are stuck please post the script.
- Michael
From: fcwilt
Hi Michael,
Thanks for the help.
You provided the information I needed.
Currently I collect all selected objects with...
var objects = moi.geometryDatabase.getSelectedObjects();
...then de-select them all.
Then I iterate over the collected objects selecting, exporting, de-selecting each one, thus getting one STL file per each initially selected objects.
So instead of selecting each one I have to decide how to identify those objects that should be exported together to the same file.
Thanks again.
Frederick