Andy_23
March 25, 2021 12:50:42
Hello,
I tried tackling the following problem: 23 bgeo files reside in a folder. Each geo/file has a proper name attribute. I'd like to load and them all in, merge and save as a single file.
I've created a TOP network and put down a file pattern node which creates work items for all 23 files on disk. Below I place a geometry import node which gets the filepath from upstream. I set the merge operation to import and merge all. Then in the storage tab I set a single output file.
When I cook the network the single file is written, yet it contains only data of one of those files.
Any help is much appreciated.
Thank you and have a great day.
Andy
tpetrick
March 25, 2021 13:11:07
After your file pattern node you need to put a Wait for All, so that all of the files are collected into a single work item. Alternatively, on the File Pattern node itself you can disable the "Split Files into Separate Items" toggle to get a single work item with all 23 files.
PDG nodes apply their procedure for each input work item, possibly in parallel. If you want to merge a list of files, the files need to all be associated with the same work item.
Andy_23
March 25, 2021 14:18:50
Thank you very much. It now works great.
Before posting here, my faulty intuition had tried a wait for all after the geometry import node and then a rop geometry output node. It failed me.
Thanks again.