Frequently Asked Questions - Advanced Scripting

Questions about writing and using scripts in Autodesk Ecotect Analysis.

How would I go about calculating the area of the analysis grid that is above a given threshold value. I know I can find the percentage of all points above it, but I need the actual floor-area and preferably very accurately.

This Ecotect script demonstrates how to iterate over the current analysis grid in your model and calculate the actual surface area that is above a given threshold, in this case the current minimum scale value. Whilst Ecotect can already show the percentage of grid points above a threshold, this script includes the fractional areas of cells that are partially above and partially below.

I have a calculated 3D analysis grid which I can use the slider to manually reposition the displayed axial section through. How can I animate this same axial section using an Ecotect script?

The following script shows you how to animate the position of the base 2D analysis grid within a set of 3D calculation results. It uses one of the example models that comes with Ecotect, but you can use your own model by simply commenting out line 4.

I see that I can simply cycle through all object in the model, but sometimes I want only certain types or just selected objects. Are there easier and quicker ways of doing this ?

One of the tasks you often need to do in an Ecotect script is iterate over objects within the model. This could just be to count all the DOOR elements or you may need to calculate the total area of all FLOOR objects. The example functions shown here illustrate different ways to do this depending on whether you want all objects or those of a certain type, on a certain zone or just from the current selection set.

I'd like to create an object and then add one or more child windows to it. I can add a new window, but how do I make it an actual hole in a wall.

The easiest way to add a child object is simply to create it and then use the object.link command to link it to it's parent object. This emulates using the Edit»Link Objects menu item. The following script snippit shows how to do this...




View desktop or mobile version of site.