Hello. You can use a Python script to achieve this effect, similar to this script:
from vcScript import *
from random import *
def OnSignal( signal ):
pass
def OnRun():
a=0.0
b=0
while True:
ran = 2
i=0
while i < ran:
a = random()*7
if int(a)!=b or i == 0:
print int(a)
i += 1
b = int(a)
else:
pass
delay(0.1)
print '------------------'
delay(0.1)
This is a small demo using the random() function, you can use it to get the component number you need to grab, then use “comp (here refers to the box).ChildComponents” to get the component handle, after that, you can You can use the pick() function in the vcHelpers .Robot2 module to grab objects, and the place() function to place components. Usually this method is used on robots. When you are not sure or have not set up your grabbing component as a robot, you can also use “comp (here refers to the grabbed component).PositionMatrix” to get the position matrix of the component and use the vcMatrix module to get it coordinates, which also includes tracking issues. There is a tracking plugin in the forum that can help with this.