Please, I need some help to create this linear track. Could someone tell me what I did wrong on my Python Script? Script in While loop doesn’t work. If I put while loop out of OnRun(), application cannot run anything, seems like it’s overloaded.
This seems to be quite rough to debug without seeing the output or having the vcmx. In these cases I recommend to check with print that what is J1 inside the loop and so on. It also seems somewhat odd to me that cable_1.Length requires a type of “string” instead of type of “float, double, real or similar”
Could you also explain your workflow on “why Python Script”? I get the idea if you want to learn it, but there might be a native way of doing this without Python Script.
Thank you so much for reply. Yes, cable_1.Length requires string type. I use Python Script because I cannot create this linear track using native ways. Could you help me solve this problem? I attached my vcmx file below, thank you again practice.vcmx (221.0 KB)
J1 = l_mover.J1
Inside the while loop, you store the variable J1 once outside the while loop in a variable and never update it, thus it stays as a constant. Then play the simulation and interact with your linear track.