Sweep through set number of layers

I am trying to sweep a surface mesh along a direction into a fixed number of layers with the following

sweep surface 1 2 3 4 5 6 7 vector 0 0 1 distance 100 include_mesh

How can I control the number of layers that this sweeps through? I want to be able to control the axial resolution of my mesh (see figure of the swept mesh). With the above command, I get 35 axial layers but I want to control that.

I would suggest doing this in two steps.

sweep surface 1 to 7 vector 0 0 1 distance 100

Then select a curve on the swept volume and set the intervals (or size) on that edge. For example,

curve 27 interval 70
mesh volume all

How would I combine that with the situation where my surfaces (that I want to extrude) are already meshed? In other words, when I run sweep, my surfaces 1 to 7 are already meshed. So after the sweeping, if I try to change the interval of the swept volume, I get an error like

CUBIT> curve 27 interval 2
WARNING: Cannot change interval settings on meshed entities.
The interval settings on Curve 27 (Curve 27) will not change.
Journaled Command: curve 27 interval 2

Don’t set the include_mesh option. So the volume is not meshed initially. Pick one of the extruded curves that is not meshed.

As a trivial example, look at this.

reset
create surface rectangle width 10 
mesh surface 1
sweep surface 1 vector 0 0 1 distance 100
curve 11 interval 100
mesh vol 1

I picked curve 27 in your model because I counted 25 curves on the top surface and added 1 as a buffer.

Thank you, this worked great!