Skip to main content
1-Visitor
August 28, 2020
Solved

Cannot hide Model Item with Visible Property

  • August 28, 2020
  • 2 replies
  • 4176 views

Hey,

 

Issue:

I cannot hide a model item using the visible property on the widget.

 

Situation:

  1. We have grouped some parts together in an assembly in Creo Illustrate.
  2. We import the PVZ into Vuforia Studio.
  3. I drag & drop a model item onto the Model.
  4. I change the component occurence property on the Model Item to match the parent assembly sBOM path in Creo Illustrate.
  5. I try to set the ModelItem visible property to hide and show it

 

  • I cannot hide or show the model item
  • I've tried doing this via script and I still cannot hide it
  • I've tried doing this via a binding on a button and still no
  • I can alter other properties such as scale, etc successfully. Only visible does not work

Please help

    Best answer by RyanAnderson

    Hey Samuel,

     

    I did try opacity but it doesn't really do the job as it turns the model into a glass-looking sort of object.

     

    I managed to achieve my usecase of hiding the model item by using ['forceHidden'] = true/false. What is forceHidden, as I do not see it as a property on a ModelItem? And is there a Vuforia API or similar that documents tricks like this?

     

    And is it possible for you to file a formal SPR on this .visible property issue on a model item when referring to models using the component occurrence property. It would be really nice if that could be fixed. I have a lot of use cases where that could come in handy.

     

    Thanks Samuel!

    2 replies

    1-Visitor
    August 31, 2020

    Any help would be greatly appreciated. Would like to get this sorted for a demo.

    17-Peridot
    August 31, 2020

    Hello Ryan,

     

    I have some questions:

    • What is the value of Component Occurrence in Model Item ?
    • In Creo View or in Creo Illustrate when opening this 3D Model, what is the sBOM Id Path ?

    https://community.ptc.com/t5/Vuforia-Studio/How-to-update-a-Model-and-retain-the-Model-Items/m-p/644397

     

    Best regards,

    Samuel

    1-Visitor
    August 31, 2020

    Hey Samuel,

    Here is the value of Component Occurrence on the Model Item:

    vuforiastudio.png

    Here is the value of sBOM Id Path of the Model in Creo Illustrate:

    creoill.png

    BR

     

    When I create a binding between pressed property on toggle button and the visibility property of the model item, nothing happens.

     

    Ryan

    17-Peridot
    September 1, 2020

    Hello Ryan,

     

    I made a Project and I am able to reproduce this issue also.

    A workaround is to use Opacity at 0 instead.

     

    By the way, I have found this thread about the same problem :

    https://community.ptc.com/t5/Vuforia-Studio/Modelitem-visibility-issue/td-p/549818?posno=5&q=ModelItem%20visible%20vuforia%20studio&source=search

     

    • Does the workaround with Opacity is working in your Project ?

     

    Best regards,

    Samuel