How do you change the appearance of an object using python script?

I don’t really know python language and I’m also doing this in kuka sim.

Lets say I have Object_1 and I want to change its appearance based on a variable in the robot; what would this type of program look like?

Inside of my robot cell all the object-shapes are laying on the floor.

I think I should be able to create a function that grabs their models and overwrites the current model in “Object_1”

Something like…

If variable = 1 then
model = model.object_2

else if variable = 2 then
model = model.object_3

Or whatever it would look like. Sorry for not knowing syntax or anything

On the Visual Components Academy webpage, there is a tutorial that covers event triggering and color changes, I think you can take a look. :melting_face:

You can also check the tutorial on using the Switch feature.

You can use the switch together with some variable to toggle what CAD model is visible.

This looks promisng. How do I connect this to a variable in the robot? I’m using kuka sim