# Libsc reuse part

**URL:** <https://forum.techsoft3d.com/t/libsc-reuse-part/5027>\
**Category:** HOOPS Visualize Web\
**Tags:** how-to\
**Created:** [December 16, 2025, 3:24am UTC](https://forum.techsoft3d.com/t/libsc-reuse-part/5027 "2025-12-16T03:24:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![820110017](https://avatars.discourse-cdn.com/v4/letter/8/bc79bd/32.png) [@820110017](https://forum.techsoft3d.com/u/820110017)\
**Post date:** [December 16, 2025, 3:24am UTC](https://forum.techsoft3d.com/t/libsc-reuse-part/5027/1 "2025-12-16T03:24:23Z")

</div>

Hi,

I created an assembly using libsc, which has two parts. The first part added some mesh data, and I want to reference the first part in the second part to achieve the goal of reusing the same mesh. How can I do it? I tried using the SetBodyInstanceMeshInstanceKey interface, but it didn’t work properly. It may be a problem with my usage. Can you give me a complete example based on the authoring\_stample project?

Thanks.

---

<div class="post-metadata">

**Author:** ![820110017](https://avatars.discourse-cdn.com/v4/letter/8/bc79bd/32.png) [@820110017](https://forum.techsoft3d.com/u/820110017)\
**Post date:** [December 16, 2025, 3:26am UTC](https://forum.techsoft3d.com/t/libsc-reuse-part/5027/2 "2025-12-16T03:26:53Z")

</div>

The ultimate effect to be achieved is that these two parts have different matrix positions and can be judged as true through the “getNodesInstancingSamePart” interface.

---

<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:** [December 16, 2025, 12:54pm UTC](https://forum.techsoft3d.com/t/libsc-reuse-part/5027/3 "2025-12-16T12:54:34Z")

</div>

Did you also create and set the part by calling:

```auto
uint32_t part_id_1 = assemblyTree.CreatePart();
assemblyTree.SetPart(child_id_1, part_id_1);
assemblyTree.SetPart(child_id_2, part_id_1);

```

For an example, please refer to our docs on [Creating Stream Cache Models](https://docs.techsoft3d.com/hoops/visualize-web/prog_guide/data_import/authoring/data-import-stream-cache-models.html#creating-stream-cache-models). On that web page, just do a search for “createpart” to get the exact reference.

---

<div class="post-metadata">

**Author:** ![820110017](https://avatars.discourse-cdn.com/v4/letter/8/bc79bd/32.png) [@820110017](https://forum.techsoft3d.com/u/820110017)\
**Post date:** [December 18, 2025, 7:21am UTC](https://forum.techsoft3d.com/t/libsc-reuse-part/5027/4 "2025-12-18T07:21:54Z")

</div>

Resolved, thank you.
