View all the plants in the ESRI.lib

2959
3
07-25-2016 12:06 PM

View all the plants in the ESRI.lib

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")
Attachments
Comments
Anonymous User

Very nice!  I made a web scene like this a couple years ago. I like your rule better than the way I did it, but this one is sorted by height, which I find useful:

http://www.arcgis.com/apps/CEWebViewer/viewer.html?3dWebScene=5bcc0f9e8ad04cd286875895fa4f8e3e

Chris

Chris this is awesome. Who knew there was a generic stump? I'm not sure if I can sort by height with the simple code I wrote, but putting them into 3 different columns is a great idea, and the webscene viewer does a way better job with the overall render and appearance. If you don't mind I'll take a shot at a hybrid of our rules.

Thanks for the rule....

A conker tree is a horse chestnut - odd choice of terminology, a bit of a brittish colloquialism I would have thought; see: game of conkers.

Version history
Last update:
‎12-12-2021 03:43 AM
Updated by: