InfraWorks 360 Ideas
Share ideas for future product features directly with the InfraWorks 360 team and collaborate on existing suggestions with your peers.

Tree heights from attributes

Status: Gathering Support
by Autodesk Support on ‎03-15-2017 02:53 AM

When using a point data file with height attributes for trees, it is not possible to load these and apply tree styles.

For buildings you can define the Roof Top height out of an Attribute.

It would be great to have the same feature for trees? For example get heights and optionally x and y scale from attributes.



By: Employee
| Posted ‎03-15-2017 10:15 AM

Karsten, can you send me a sample data file to check it out? Thanks.

By: Collaborator John.DeLeeuw
| Posted ‎03-17-2017 07:11 AM

@Karsten.Saenger, in the Table tab of your Data Source, you can set the height attribute in the Scale Z value for your trees. You can also set the Width attribute for X and Y scales.



By: Autodesk Support
| Posted ‎03-17-2017 07:54 AM

Hi @John.DeLeeuw


you are correct, but this is a scale factor. The goal ist to input absolute heights.
If you import the point file as trees they come up with height 5.5x . If you set the heights interactively the tress are also scaled in X and Y.

Have a look at this screencast – it’s the workaround:


The “Height” attribute in the Shape file is the absolute height of a tree in meter.

The goal is not to “scale” the tree, because there is no scale factor. The idea is to get the possibility to use an attribute for the tree height (i.e. 10 meter) and the X and Y scale factor is applied automatically – same as shown in the video.


By the way – a workaround could be to calculate scale factors for X, Y, Z and add these to the shape attributes.

But this only works it the default tree height is always 5.592 m?




By: Collaborator John.DeLeeuw
| Posted ‎03-17-2017 08:04 AM

@Karsten.Saenger, I agree the scaling values also stretch the (basic) tree. If the basic tree is already 5.592 meters in height you can always use the formula Scale Z/5.592 to get the actual absolute height from your shape file.


The only way this can be accomplished correctly without scaling and deforming issues, would be parametric trees, just like the buildings are.

By: Advocate roskirko
| Posted ‎03-23-2017 11:30 AM


Here the .js file Autodesk helped me write to read a text file output from a GPS system so that Infraworks can show the height of trees precisely as well as having a tooltip with the species data.


// global variables

var db = app.ActiveModelDb;
var dbWkt = app.ActiveModel.CoordSysWkt;
var classID = db.TableIndex("TREES");
var table = db.Table(classID);

var model = app.ActiveModel;
var Wkt = app.GetBestFittingUTM84ProjectionWkt(model.Boundary.BBox2d, dbWkt);

// var Wkt = "PROJCS[\"WGS_1984_UTM_Zone_17N\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.000,298.25722293,AUTHORITY[\"EPSG\",\"32617\"]],TOWGS84[],AUTHORITY[\"EPSG\",\"32617\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"32617\"]],UNIT[\"degree\",0.017453292519943295,AUTHORITY[\"EPSG\",\"32617\"]],AUTHORITY[\"EPSG\",\"32617\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"32617\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",-81.00000000000000],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",-5000000],AUTHORITY[\"EPSG\",\"32617\"]]";

var feature = table.GetWriteRow();

var TreeAdd = function (East, North, Elev, Type, Species, Height) {

var pointJSON = {
"type" : "Point",
"coordinates" : [East, North, Elev]
var geom = new adsk.Geometry(pointJSON);
geom = geom.Reproject(Wkt, dbWkt);
//var point = new adsk.Geometry(pointJSON);

//var pos = new adsk.Vec3d(East, North, Elev); // error : line: 20 : ReferenceError: Can't find variable: alx

//var geom = new fdo.Geometry(pos);
//geom = geom.Reproject(Wkt, dbWkt);

feature.GEOMETRY = geom;
feature.TOOLTIP = Species;
feature.DESCRIPTION = Species;
feature.GUID = app.createGuid();

switch (Type) {
case "Conifer":
feature.RULE_STYLE = "3D Model/Vegetation/Pinus Pinaster";
feature.MODEL_SCALE_X = Height/4.72;
feature.MODEL_SCALE_Y = Height/4.72;
feature.MODEL_SCALE_Z = Height/4.72;

case "Decid":
feature.RULE_STYLE = "3D Model/Vegetation/Quercus Robur";
feature.MODEL_SCALE_X = Height/4.40;
feature.MODEL_SCALE_Y = Height/4.40;
feature.MODEL_SCALE_Z = Height/4.40;

feature.RULE_STYLE = "3D Model/Vegetation/Oval Hedge";
feature.MODEL_SCALE_X = 5;
feature.MODEL_SCALE_Y = 5;
feature.MODEL_SCALE_Z = 5;


// signal that the tile cache needs to be regenerated
app.InvalidateTileCache(classID, geom.BBox2d);


var TreeFile = file.ReadFile("C:/Users/User/Desktop/Text_Docs/Nov4Treesv7.txt");

// Nov4Treesv7.txt has the following structure :
// PtID,Easting,Northing,Elevation,Type,SpeciesLabel,Species,HeightLabel,Height
// 100,483520.036,4762489.950,270.174,Conifer,Species,White spruce | Picea glauca,Height,23
// 101,483480.036,4762469.950,270.098,Decid,Species,Black oak | Quercus velutina,Height,17

var TreeData = TreeFile.split("\n");

for (var i = 0; i < TreeData.length; i++) {
var TreeAttrib = TreeData[i].split(",");
if (TreeAttrib.length < 9)

TreeAdd(parseFloat(TreeAttrib[1]), parseFloat(TreeAttrib[2]), parseFloat(TreeAttrib[3]), TreeAttrib[4], TreeAttrib[6], parseFloat(TreeAttrib[8]));

Submit Your Ideas

Share and shape product ideas.

Submit an idea
Idea Guidelines

Please review our Idea guidelines and best practices before posting a new idea, or voting on an existing one!