#
# Set the Motion Frames
#
velocities = [0.1676,0.1676,0.1676,0.1676 ,0.3352, 0.4623 ,0.4724 ,0.64 ,0.7671, 0.7772, 0.9448, 1.0719,1.1430]
study=app.GetStudy()
motion_frame_source = study.GetMotionFrameSource()
motion_frames=[]

for i in range(0,12):
    number_str=""
    if(i+1<9):
        number_str="0"
    motion_frames.append(motion_frame_source.NewFrame())
    motion_frames[i].SetName(f'Belt Velocity <{number_str}{str(i+2)}>')
    motion_frames[i].SetKeepInPlace(True)
    motions = motion_frames[i].GetMotions()
    motions_new_list_item = motions.New()
    translation_motion=motions_new_list_item.SetType("Translation")    
    translation_motion.SetVelocity((velocities[i+1],0,0),"m/s")
    belt=study.GetGeometry(f'Belt_{number_str}{str(i+2)}')
    motion_frames[i].ApplyTo(belt)
    belt.SetMaterial('Default Belt')

    
#