# How to show or hide PMI data in 'Animation'

**URL:** <https://forum.techsoft3d.com/t/how-to-show-or-hide-pmi-data-in-animation/4754>\
**Category:** HOOPS Visualize Web\
**Created:** [July 1, 2025, 7:39am UTC](https://forum.techsoft3d.com/t/how-to-show-or-hide-pmi-data-in-animation/4754 "2025-07-01T07:39:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bgupta](https://avatars.discourse-cdn.com/v4/letter/b/8baadc/32.png) [@bgupta](https://forum.techsoft3d.com/u/bgupta)\
**Post date:** [July 1, 2025, 7:39am UTC](https://forum.techsoft3d.com/t/how-to-show-or-hide-pmi-data-in-animation/4754/1 "2025-07-01T07:39:09Z")

</div>

I have list of node Ids, if I pass that in an array and apply show hide as we do for component, there is no change in PMIs

---

<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:** [July 1, 2025, 1:38pm UTC](https://forum.techsoft3d.com/t/how-to-show-or-hide-pmi-data-in-animation/4754/2 "2025-07-01T13:38:04Z")

</div>

I believe you are referring to the `Animation` example available as part of the [quickstart](https://docs.techsoft3d.com/communicator/latest/overview/quickstart.html#quickstart)  
module.

A couple of comments:

- Are you able to toggle visibility through a selection of the PMI in the viewer? So instead of passing an array of PMI node ids, if you select via the mouse a single PMI node, does that work?
- When you are passing an array of node ids to change the visibility, are there any errors in the browser developer console?

---

<div class="post-metadata">

**Author:** ![bgupta](https://avatars.discourse-cdn.com/v4/letter/b/8baadc/32.png) [@bgupta](https://forum.techsoft3d.com/u/bgupta)\
**Post date:** [July 2, 2025, 5:03am UTC](https://forum.techsoft3d.com/t/how-to-show-or-hide-pmi-data-in-animation/4754/3 "2025-07-02T05:03:01Z")

</div>

async addOpacityAnimation(nodes, startTime, duration, opacity) {

```
    for (const nodeId of nodes) {
        const channelName = `Opacity-${nodeId}`;
        // if (undefined == this._nodeOpacities[nodeId]) {
        const opacity = await this.viewer.model.getNodesOpacity([nodeId]);
        this._nodeOpacities[nodeId] = (opacity[0] == null) ? 1 : opacity[0]
        // }

        const buffer = new Communicator.Animation.KeyframeBuffer(Communicator.Animation.KeyType.Scalar);
        const sampler = new Communicator.Animation.Sampler(buffer, Communicator.Animation.InterpolationType.Linear);
        const channel = this.animation.createNodeChannel(channelName, nodeId, Communicator.Animation.NodeProperty.Opacity, sampler);

        channel.sampler.buffer.insertScalarKeyframe(startTime, this._nodeOpacities[nodeId]);
        console.log(`Opacity for node ${nodeId} at start time ${startTime}: ${this._nodeOpacities[nodeId]}`);
        channel.sampler.buffer.insertScalarKeyframe(startTime + duration, 0);
        console.log(`Opacity for node ${nodeId} at end time ${startTime + duration}: ${0}`);

        // this._nodeOpacities[nodeId] = opacity;
    }
}

```

I am using this function code for animating nodes. With this code component nodes are animating but PMI nodes are not. Also It doesn’t show any error.

addOpacityAnimation([12],1,1,1) or addOpacityAnimation([12],1,1,0)

---

<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:** [July 2, 2025, 9:44pm UTC](https://forum.techsoft3d.com/t/how-to-show-or-hide-pmi-data-in-animation/4754/4 "2025-07-02T21:44:34Z")

</div>

After further testing, we can reproduce the issue. As such, we’ll go ahead and create a support ticket on your behalf. You will get a separate notification regarding this.

Thanks,  
Tino
