Cancel
Showing results for 
Search instead for 
Did you mean: 

Simtalk to access to a graphic in the graphic structure

Pioneer
Pioneer

Good morning, I would like to access through simtalk to a element in the graphic structure in order to make it appear or dissappear if one condition is true or false. What is the command in simtalk to do that, to access to an element in the graphic structure?

 

access.pngThank you

 

 

3 REPLIES

Re: Simtalk to access to a graphic in the graphic structure

Legend
Legend

Hi,

in my models I use this methods

 

path._3D.ShowGraphicGroup();
path._3D.HideGraphicGroup();

 

but you have to regroup your structure creating several graphic groups. For instance, you want to split your file in 5 different parts, you need 5 graphic groups.
Then you can turn on or turn off each group independently from the other ones.

Regards
Alessio

Re: Simtalk to access to a graphic in the graphic structure

Pioneer
Pioneer

Thank you for your answer Alessio, I tried to do as you tell me but I obtain different errors so I'm sure that I doing something bad. I have made an example in order to know what I'm doing bad.

 

I have this simulation where I have a Welding place (it's name is welding_location which is only a graphic (not a singleproc or buffer...). This graphic is in a group called "deco" and I want to make it dissapear when the worker is in the workplace called "Workplace". The first problem is how to know the path of the graphic because if I put .Models.frame.Welding_location as path the method shows error because an unknown path. I give some images and I also put the model in .spp in order to take a look.

 

Sin título1.png

 

Sin título2.png

 

Thank you for your time 

 

 

Re: Simtalk to access to a graphic in the graphic structure

Legend
Legend

The right command is

 

.Models.frame._3D.HideGraphicGroup("deco");
 

or

 

.Models.frame._3D.ShowGraphicGroup("deco");