How do I change the properties value of the Part held by Grap?

Hello
When Grap Part with a robot
I want to change the propirties value of Grap Part.

Hi,

Probably the easiest way is to use an event from the container. Basically whenever something exits or enters a container (in this case, the robot will grab and object and place it on its own container) the software can get a “notification” of the specific part that either left or arrived.

Pseudo-code would look like this:

comp = getComponent()
cont = comp.findBehaviour('your_container')


def foo(part, arrive_leave):
    if arrive_leave:
        print part
        # you can modify the part (which is the component that you just grabbed)

cont.OnTransition = foo
1 Like