# Will the node IDs always be the same between loads of the viewer?

**URL:** <https://forum.techsoft3d.com/t/will-the-node-ids-always-be-the-same-between-loads-of-the-viewer/51>\
**Category:** HOOPS Visualize Web\
**Created:** [July 3, 2019, 6:18pm UTC](https://forum.techsoft3d.com/t/will-the-node-ids-always-be-the-same-between-loads-of-the-viewer/51 "2019-07-03T18:18:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbeyer1](https://avatars.discourse-cdn.com/v4/letter/r/fbc32d/32.png) [@rbeyer1](https://forum.techsoft3d.com/u/rbeyer1)\
**Post date:** [July 3, 2019, 6:18pm UTC](https://forum.techsoft3d.com/t/will-the-node-ids-always-be-the-same-between-loads-of-the-viewer/51/1 "2019-07-03T18:18:27Z")

</div>

Yes, but loading multiple models in the same scene requires accounting for a shift in node IDs.

Here’s how to do this: After you’ve loaded your first model, you’ll want to keep track of the shift before loading a new model. These two lines show how to capture the shift amount from the viewer:

const model = hwv.model;

const nodeOffset = model.getLowestAvailableNodeId();

Now anywhere you need the persistent node ID you would do something like this:

const id = selection.getNodeId() - nodeOffset;

This will always allow you to get back to the persistent ID for retrieving associated application level data.

For more information, see the [Assembly Tree Node IDs](https://docs.techsoft3d.com/communicator/latest/build/authoring-libsc-assembly-tree-node-ids.html) page.

---

<div class="post-metadata">

**Author:** ![Jerome](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/jerome/32/21_2.png) [@Jerome](https://forum.techsoft3d.com/u/Jerome)\
**Post date:** [September 16, 2019, 1:04pm UTC](https://forum.techsoft3d.com/t/will-the-node-ids-always-be-the-same-between-loads-of-the-viewer/51/2 "2019-09-16T13:04:06Z")

</div>



---

<div class="post-metadata">

**Author:** ![Jonathan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/jonathan/32/44_2.png) [@Jonathan](https://forum.techsoft3d.com/u/Jonathan)\
**Post date:** [August 11, 2021, 5:53pm UTC](https://forum.techsoft3d.com/t/will-the-node-ids-always-be-the-same-between-loads-of-the-viewer/51/3 "2021-08-11T17:53:53Z")

</div>


