Sorry for my slow reply. I've been traveling and haven't had much time to tend the forum recently.
I started to write a description of how I would approach this but decided a sample is easier for both of us. Below is a picture of the result.

Below is the code that I used to accomplish the creation of the curve above. It asks you to select a vertex and then uses hard-coded values to find a specific joint in the assembly but then it changes the angle of that joint and saves the current position of the vertex in a collection and finally uses those points to create the curve. Of course it wouldn't have to be a vertex that you track but anything that can be used to infer a position.
Here's the code and I've attached the assembly that I used. You'll see that the joint is actually in one of the sub-assemblies and the code would actually be a bit simpler if the joint is in the root component.
import adsk.core, adsk.fusion, traceback, math
def run(context):
ui = None
try:
# Boilerplate code to access Fusion 360 instance.
app = adsk.core.Application.get()
ui = app.userInterface
product = app.activeProduct
design = adsk.fusion.Design.cast(product)
root = design.rootComponent
# Get the joint called "Motor" in PistonAssembly:1
# This gets the joint within the PistonAssembly component,
# not in the context of the top-level assembly.
pistonOcc = root.occurrences.itemByName('PistonAssembly:1')
joint = pistonOcc.component.joints.itemByName('Motor')
# We need the joint relative to root component so we
# need a proxy for the joint.
joint = joint.createForAssemblyContext(pistonOcc)
# Have the point to track selected.
pointSel = ui.selectEntity('Select a vertex.', 'Vertices')
vert = adsk.fusion.BRepVertex.cast(pointSel.entity)
numSteps = 90
startValue = 0
endValue = math.pi * 2
# This assumes the joint is a revolute joint.
revMotion = adsk.fusion.RevoluteJointMotion.cast(joint.jointMotion)
revMotion.rotationValue = startValue
positions = adsk.core.ObjectCollection.create()
for i in range(numSteps+1):
val = startValue + ((endValue - startValue) * (i/numSteps))
revMotion.rotationValue = val
app.activeViewport.refresh()
positions.add(vert.geometry)
sk = root.sketches.add(root.xYConstructionPlane)
sk.sketchCurves.sketchFittedSplines.add(positions)
sk.name = 'Motion Curve'
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))