Changing Index in a Parametric Model
| Undesired Outcome | Intended Outcome | |
|---|---|---|
| Returns | The top polygon is no longer extruded after the parameter for the number of floors is changed.
|
The top polygon is extruded to form a roof regardless of the parameter value for the number of floors.
|
| Procedures |
|
|
| Explanations | The error occurs because ex[120] does not always refer to the top polygon in the model as this is a parametric model in which the number of polygons changes. Hence the extrusion is not created at desired polygon. |
The top polygon that is meant to be extruded is always the last item in the list of extruded polygons. The index of the last item in ex is ex[listLen(ex)-1]. |