MoI discussion forum
MoI discussion forum

Full Version: FBX multiple objects export to separate files.

Show messages:  1-20  21-27

From: Anton.Berezin (ANTONBEREZIN)
19 Nov 2020   [#21] In reply to [#20]

Yes sure.
And sorry for my incompetence

Attachments:
ExportNamedObjectsToIndividualFiles_test.js
test.3dm


From: Michael Gibson
19 Nov 2020   [#22] In reply to [#21]
Hi Anton, try this attached one, and also the script is expecting the line's object name to be "reg_line" but in your .3dm file it is named "Testline".

I still didn't test this so please let me know if it still doesn't work and I will take a closer look.

- Michael

Attachments:
ExportNamedObjectsToIndividualFiles_test.js


From: Anton.Berezin (ANTONBEREZIN)
19 Nov 2020   [#23] In reply to [#22]

Oh thanks man. It is realy working.
How could I thank you?
I am illustrator and if you need something to draw let me know.
(yaberezinanton@yandex.ru)


From: Michael Gibson
19 Nov 2020   [#24] In reply to [#23]
Hi Anton, that's great!

> How could I thank you?

It would be fun to see some of the output that you're using it for! :)

- Michael
From: Anton.Berezin (ANTONBEREZIN)
19 Nov 2020   [#25] In reply to [#24]

I’m trying to create method to export a complex illustration\model as different parts\files for further processing and assembly in Adobe illustrator.

I will show you the result

Thanks again


From: Mindset (IGNITER)
1 Jan 2023   [#26] In reply to [#22]
Hey Michael,

How can I make ExportNamedObjectsToIndividualFiles work for STEP [(*.stp, *.step, *.stpz) (AP 203, AP 214, AP 242)] ,or SAT [(*.sat) (Up to 2020)] Files?
Also, my target app, Alibre Atom3D, accepts only one Solid per file.
This script will write out every object having an identical name to the same file.
Might it append a numeric incremental for each such duplicately named solid and thereby save it into its own separately named file?
Another problem is that it will write out a group, rather than just its individual constituent solids.
Also, might the user pick the output directory at runtime ?


Thanks,
MindSet
From: Michael Gibson
1 Jan 2023   [#27] In reply to [#26]
Hi MindSet,

Are you using the ExportNamedObjectsToIndividualFiles.js that was in this previous post? :
http://moi3d.com/forum/index.php?webtag=MOI&msg=8226.8

re:
> How can I make ExportNamedObjectsToIndividualFiles work for STEP [(*.stp, *.step, *.stpz)
> (AP 203, AP 214, AP 242)] ,or SAT [(*.sat) (Up to 2020)] Files?

MoI will figure out what file type to write based on the file extension on the filename.

So to make it export STEP instead of FBX, go to line number 43 in the script which has this currently:
code:
    var filename = g_dirname + name + '.fbx';

And change the .fbx to .stp like this:
code:
    var filename = g_dirname + name + '.stp';

re:
> Might it append a numeric incremental for each such duplicately named solid and thereby save it
> into its own separately named file?

I've attached a version that should do that.


> Another problem is that it will write out a group, rather than just its individual constituent solids.

This should be fixed in the attached version also.


> Also, might the user pick the output directory at runtime ?

Sorry no that's not easy to do currently because there is not a directory picking UI set up for a script to use. I'll see what's involved in setting one up.

- Michael

Attachments:
ExportNamedObjectsToIndividualFiles.js


Show messages:  1-20  21-27