I’m a KukaSimPro 3.0.3 user wich I guess is the very same as the VisualComponents 4.
I would like to know what if there is some kind of “Component Grabber” in the VisualComponents 4 (KukaSimPro 3.0.3).
This feature exists in the old VC (KukaSim) software.
The purpose of this, is, for example, to be able to grab a part with a “Succion cup” mounted on linear joint (like a piston).
In attachement, you’ll have the component.
SuccionCupGrabber.vcmx (50 KB)
I believe the method you are looking for is:
vcComponent inherits this method from vcNode
# Wait for a component in your container.
while not getComponent().getBehaviour("MyContainerName").HeadComponent:
joint = getComponent().findNode("MyJointName") # Find the joint object
child = getComponent().getBehaviour("MyContainerName").HeadComponent #Find the component you want to attach to the joint
joint.attach(child) # Now any movement of the joint will also move the child component.