If 'P' is the part name
The first form:
P.ReferencePoint(point=(0, 0, 0))
R= P.referencePoints[l]
P.DatumPointByOffset(point=R, vector=(10,0,0))
P.DatumPointByOffset(point=R, vector=(4,-4,0))
P.DatumPointByOffset(point=R, vector=(1,0,0))
K = P.datums.keys()
K.sort()
p1 = P.datums[K[2]]
p2 = P.datums[K[1]]
p3 = P.datums[K[0]]
P.DatumPlaneByThreePoints(point1=p1,point2=p2,point3=p3)
The second
P.ReferencePoint(point=(0, 0, 0))
R= P.referencePoints[l]
p3=P.DatumPointByOffset(point=R, vector=(10,0,0))
p2=P.DatumPointByOffset(point=R, vector=(4,-4,0))
p1=P.DatumPointByOffset(point=R, vector=(1,0,0))
P.DatumPlaneByThreePoints(point1=p1,point2=p2,point3=p3)
Thanks for reading.