cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Hide parent of component

LS_9776545
Regular Member

Hide parent of component

Hi everyone, 

in my project I'm able to access metadata of PVZ and hide/unhide a selected component. 

 

So, how I could hide the parent of the selected component? 

For example, If my Bom is something like: 

 

/12512/325/12
/12512/325/13
/12512/325/11
/12512/325/100

 

 

When I selected 12 or 13 or 11 or 100 I want to hide all 325 groups. How could I access to this information?

 

Thank You. 

1 REPLY 1

Re: Hide parent of component

So for I remember (I am not 100% sure) in  some demos I saw in the past there was some usage like this

- to hide all components in the model-1 widget

tml3dRenderer.setProperties('model-1-/', { decal:false, hidden:true });

to model-1 with path 0-0-6 and the comp level below to set hidden and the decal 

Here example to set also the shader (depending on mode preview or mobile) , decal and hidden 

tml3dRenderer.setProperties('model-1-/0/0/6', { shader:twx.app.isPreview()?"Default":"xray2;cutoffDepth f 0.25", decal:false, hidden:true, opacity:0.99 });

example

tml3dRenderer.setProperties("model-1-/12512/325", { hidden:true });

or

tml3dRenderer.setProperties("model-1-/12512/325/", { hidden:true });

I think the first example will hide the comp path /12512/325

and the second will hide all component in the next level below- I think the effect will be the same but later you can change the hidden for subcomponent.

tml3dRenderer.setProperties("model-1-/12512/325/", { hidden:true });

Because I did not test now by myself so if it will not work then,please, let me know so I  need to check it more detailed

Announcements
Join an
AR Working Group!

Topics available:
AR/VR for Data Optimization AR/VR for Security and Control AR/VR for Inspection