An alternative that would be shapesheet contained...

Pre-build the max structure, using multiple Geometry Sections. Then, as suggested, use Shape Data to get the total number of sections up to max limit.

For example, let's say the tallest structure uses 10 sections. In the shapeshjeet, would add Geometry sections such hat total number is 10. The visibility of each section would be controlled by the User specified entry, say 5. Thus, Geometry sections 1- 5 would be visibile, and 6-10 would be hidden.

Each Geometry section would be defined such that if would stack upon the immediately preceding section. Thus, there is only one shape. Limitation is that the shape properties apply universally to all Geometry sections.