# Issue with Generating Shattered SCZ and SCS Files – Only Single File Created

**URL:** <https://forum.techsoft3d.com/t/issue-with-generating-shattered-scz-and-scs-files-only-single-file-created/4903>\
**Category:** HOOPS Exchange\
**Tags:** code, how-to\
**Created:** [September 19, 2025, 12:12pm UTC](https://forum.techsoft3d.com/t/issue-with-generating-shattered-scz-and-scs-files-only-single-file-created/4903 "2025-09-19T12:12:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kamij83019](https://avatars.discourse-cdn.com/v4/letter/k/41988e/32.png) [@kamij83019](https://forum.techsoft3d.com/u/kamij83019)\
**Post date:** [September 19, 2025, 12:12pm UTC](https://forum.techsoft3d.com/t/issue-with-generating-shattered-scz-and-scs-files-only-single-file-created/4903/1 "2025-09-19T12:12:24Z")

</div>

Hi TechSoft3D Team,

I am trying to export a CAD file to **shattered SCZ , SCS and master.xml** using HOOPS Communicator/Authoring SDK, but I am only getting a single `.scz` and `.scs` file, instead of multiple shattered parts.

Here’s the code I am using:

```auto
bool HoopsConverter::ExportToShattered(const MY_CHAR* license, const MY_CHAR* input, const MY_CHAR* output) {
    std::string startTime = GetFormattedTime();
    auto start = std::chrono::high_resolution_clock::now();
try {
    // Initialize converter
    Converter converter;
    converter.SetLogfile(logFilePath.c_str());
    if (!converter.Init(license)) {
        LogMessage("ERROR: SCZ Converter initialization failed.");
        return false;
    }

    Importer importer;
    if (!importer.Init(&converter)) {
        LogMessage("ERROR: SCZ Importer initialization failed.");
        return false;
    }

    SC_Import_Options importOptions;
    if (!importer.Load(input, importOptions)) {
        LogMessage("ERROR: Failed to load input file: " + std::string(input));
        return false;
    }

    Exporter exporter;
    if (!exporter.Init(&importer)) {
        LogMessage("ERROR: SCZ Exporter initialization failed.");
        return false;
    }

    // Ensure directories exist
    std::string outputDir = std::string(output);
    std::string scsDir = outputDir + "/scs";
    std::string sczDir = outputDir + "/scz";
    fs::create_directories(outputDir);
    fs::create_directories(scsDir);
    fs::create_directories(sczDir);

    std::string xmlFile = outputDir + "/master.xml";

    // Setup export options
    SC_Export_Options exportOptions;
    exportOptions.export_assemblytree = true;
    exportOptions.export_materials = true;
    exportOptions.export_physical_properties = true;
    exportOptions.export_attributes = true;
    exportOptions.export_measurement = true;
    exportOptions.prepare_shattered_xml = xmlFile;
    exportOptions.prepare_shattered_scs_parts = scsDir;
    exportOptions.prepare_shattered_parts = sczDir;
    exportOptions.compute_bounding_boxes = "All";

    // Export shattered SCZ
    if (!exporter.WriteSCShattered(exportOptions)) {
        LogMessage("ERROR: Failed to export SCZ files.");
        return false;
    }

    if (!fs::exists(xmlFile)) {
        LogMessage("WARNING: master.xml not created at: " + xmlFile);
    }

} catch (const std::exception& e) {
    LogMessage(std::string("Exception in ExportToSCZ: ") + e.what());
    return false;
}

return true;
}

```

**Problem:**

- The export completes successfully, and I get one `.scz` file in `scz/` and one `.scs` file in `scs/`.

- The `master.xml` file is created correctly but not sure is correct .

- No other shards are generated, even though my CAD model contains multiple components/subassemblies.

**What I want:**

- Multiple shattered `.scz` files for each part/component.

- Corresponding `.scs` files for each part/component.

- `master.xml` listing all part/component.

**Questions:**

1. Is there any issue in my code that prevents shattering?

2. Are there additional `SC_Export_Options` flags I need to set to force shattering?

3. Could the problem be related to input file naming, directory paths, or something else?

Any help or guidance would be appreciated!

Thanks.

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [September 19, 2025, 12:29pm UTC](https://forum.techsoft3d.com/t/issue-with-generating-shattered-scz-and-scs-files-only-single-file-created/4903/2 "2025-09-19T12:29:57Z")

</div>

Is the source CAD file itself comprised of an assembly file and individual part files? Or is the source file one monolithic file?

---

<div class="post-metadata">

**Author:** ![cad-developer](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@cad-developer](https://forum.techsoft3d.com/u/cad-developer)\
**Post date:** [September 19, 2025, 1:08pm UTC](https://forum.techsoft3d.com/t/issue-with-generating-shattered-scz-and-scs-files-only-single-file-created/4903/4 "2025-09-19T13:08:09Z")

</div>

Could you advise how we can determine if the file is monolithic? We have a Navisworks source file, and when we use [https://github.com/toshi-bata/shattered](https://github.com/toshi-bata/shattered), it shatters properly.

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [September 19, 2025, 1:19pm UTC](https://forum.techsoft3d.com/t/issue-with-generating-shattered-scz-and-scs-files-only-single-file-created/4903/5 "2025-09-19T13:19:12Z")

</div>

In the link you provided, there is this description:

> shattered assembly can be created from some native CAD formats whose **sub-components**  **reside in individual files** such as CATIA V5, Creo - Pro/E, NX or SolidWorks

In other words, if the source file is just one file, it is monolithic.
