And using the python script you can make an animation out of it.
It's good enough that you can make an animated jansen mechanism using it.
I'm new at python scripting, by the way.
Here I used a simple four-bar linkage.
The 30 mm crank is constrained angularly with the x-axis. That constraint is what I used to move the mechanism.
You only need to rotate the crank in order to move the entire mechanism.
editing the python script in macro editor, you can manipulate the angle constraint to change value at every instant of time, as well as the interval " i += 0.1"
this code is the one responsible for changing the value of the selected constraint,from PySide import QtCore
i = 0
# use the "Constraint Number minus 1" for the # in the (#.App.Units.Quantity(i)) in the line below
i += 0.1
timer = QtCore.QTimer()
timer.timeout.connect( update )
timer.start( 1 )
in this case, my angular constraint is number 9, but you must always subtract 1.
I honestly don't know why.
you can copy the edited script from the macro editor and paste it in the python console, or execute it directly from the macros.
After that you can exit the sketcher and the animation will still continue.
Just type timer.stop() to stop the animation