Scripts & Automation

Articles about programming and/or using scripts to control the analysis process.

How can I calculate the analysis grid area?

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.

Introducing Scripts in ECOTECT

Scripts have been available in ECOTECT from very early on in its development and are probably one of its most under-utilised features. Anyone can write and run a script in ECOTECT and they can be used to add new functionality, automate complex tasks, initialise or standardise a model to your firm's requirements, generate summary data, export to another application, etc. Pretty well anything you can imagine. This article is a brief description of what a script is and what it contains.

How can I animate the analysis grid with a script?

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.

Can I Calculate the Building Compactness Ratio?

My local authority needs the 'Compactness Ratio' for my building, which is the ratio of room volume to floor area. Can I calculate this is Ecotect ?

The following script will do this for you, allowing you to calculate the ratio of zone volume to floor area. It also demonstrates the generation of a simple HTML report showing values for each thermal zone in the model, as well as summed overall values at the bottom.

What is the best way to iterate over objects in Ecotect ?

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.

How can I add a child to another object in a script?

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 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...

What are the red and blue arcs on the annual sun-path?

When you overlay an Annual Sun-Path Diagram on the model in the VISUALISE page, two additional red and blue arcs appear that are not displayed in any of the other Sun-Path diagram views. What do they show?

These arcs represent the range of azimuth angles that the Sun travels through in Summer and Winter. The aim in showing these arcs is to highlight the seasonal differences and allow the designer to quickly understand and, hopefully, take advantage of them.

Why is my outdoor area seemingly always in shade?

When I create an object on the ground to investigate shading, why is it apparently always 100% in shade and its shading mask completely black?

When you create an object in Ecotect, it tries to be a bit intuitive in working out what you intended. If you create a planar surface on the ground plane, Ecotect assumes that you want this to be a floor beneath other geometry. Thus it assigns it as a FLOOR object with it's surface normal facing downwards. As a result, it will always be in shade as it faces the ground.

View desktop or mobile version of site.