View all the plants in the ESRI.lib

Document created by devlavigne on Jul 25, 2016
Version 1Show Document
  • View in full screen mode

I don't know about you, but I didn't have the patience or the mental capacity to cycle through and remember all 127 plants in the ESRI.lib, seeing what each species looks like and overall quality of the models. I'm sure some botanists and landscape architects might know what a Conker Tree is, but I don't. So I wrote some CGA that basically queries the Plant_Loader.cga and places and labels each of 127 plants. Simple create a rectangular object and apply the rule. That's it.

 

The CGA file is attached and the code is below. If you have any suggestions or requests please email me dlavigne@hlplanning.com

I hope you find this as useful as I do when bringing these assets into other rules.

 

Devin Lavigne, AICP LEED-AP
Principal | Cofounder
Houseal Lavigne Associates

188 West Randolph Street, Suite 200 | Chicago, IL 60601

http://www.hlplanning.com

 

/**
 * File:    plantlist.cga
 * Created: 25 Jul 2016 15:32:30 GMT
 * Author:  Devin Lavigne
 */




###  Have you ever wondered what plants come in the master ESRI.lib?
###  This rule queries the Plant_Loader rule in the ESRI.lib and then places each species at their max height with a label.
###  All you need to do is create a rectangular shape and then just apply the rule.
###  If you have any suggestions or requests please email me dlavigne@hlplanning.com





version "2016.0"


import Plant:"/ESRI.lib/rules/Plants/Plant_Loader.cga"
import Text:"/ESRI.lib/rules/General/Text.cga"


PlantNumber = Plant.nPlants


@Hidden
attr SubSplit = 0
@Hidden
attr Length = 0


@StartRule
Area-->
  alignScopeToGeometry(yUp,1)
  s(PlantNumber*20,0,20)
  set(Length,scope.sx)
  plantpoints(0)

plantpoints(counter)-->
  case SubSplit <= PlantNumber:
  split(x) {Length/PlantNumber:plantArea(SubSplit) | ~1: set(SubSplit, SubSplit+1) plantpoints(SubSplit)}
  else:
  NIL

plantArea(plantnum)-->
  comp(f) {top=PlacePlant(plantnum)[Ground]}


PlacePlant(plantnum)-->
  set(Plant.Name, Plant._commonName(SubSplit))
  set(Plant.Height, Plant._heightMax(SubSplit))
  set(Plant.Radius, Plant._radius(SubSplit,Plant.Height))
  Plant.Generate
  set (Text.Text,Plant.Name)
  set (Text.Size,2)
  rotate(abs, world, 270,180,270)
  t(Plant.Height,0,scope.sy/2-Text.Size)
  Text.Generate   
    
 Ground-->
  color("#56a554")

4 people found this helpful

Attachments

Outcomes