How to loop over partitions?

Dear all,

I am trying to loop over a number of partitions from datum planes. The datum plane creation goes without any problem. However, i get an error whilst creating the physical partition. Any ideas?


Here is my code

-----------------------------------------------------------------------------------------------

list = np.linspace(0,L,10)
for i in list:
mdb.models['Model-1'].parts['plate'].DatumPlaneByPrincipalPlane(offset=i, 
principalPlane=YZPLANE)

mdb.models['Model-1'].parts['plate'].PartitionFaceByDatumPlane(datumPlane=
mdb.models['Model-1'].parts['plate'].datums[i], faces=
mdb.models['Model-1'].parts['plate'].faces.getByBoundingBox((i,0,0),(i,B,0.12)))

-----------------------------------------------------------------------------------------------

Best regards