Lot ID in CGA script?

02-23-2017 12:30 AM
New Contributor

I'm using the report mechanism to dump metadata about the buildings on a lot.  Each building is composed of one or more components.  Each of those components imports geometry and places it to make up the whole building.  What'd I'd like to do is to tag each component with the "Lot ID" of the parcel of land the building is created on.  The best I've done so far is:

Lot -->

   Building(seedian)      # Seems to be unique, and consistent, for each Lot

Building(id) -->


Floors(id) -->

   split(y) { 10: Floor(id) }*

Floor(id) -->


   reportLib.makeReport(id, floorGeo)

etc.  Mostly following the report generating Tutorial.  Is this the "right" way to do this?  I want the resulting

metadata organized by Lot.  In the export script it didn't seem modelOID or shapeOID were per-Lot, or that

there was any way to look up the OID of the source Lot.

Sorry, I'm pretty new to all this.  I apologise if I'm using the wrong language to describe this stuff.

Thanks for any help!

0 Kudos
1 Reply
Esri Regular Contributor

That should work, but if you want to get smaller numbers than typically present in seedian values, then here's another workaround.

You could select all your lots, export them to a FileGDB (File -> Export Models), and then import the gdb into a scene (find file in models folder -> drag file into scene).  Exporting as a GDB automatically creates a unique object attribute called OBJECTID on each shape (see Object Attributes section in Inspector).

Then, you can link a rule attribute to this object attribute by either creating an attribute called OBJECTID and linking the attribute (in Inspector, click on drop down next to attribute -> Connect Attribute-> Object Attribute) or by linking an attribute of any name to the OBJECTID (Inspector -> click on drop down next to attribute -> Connect Attribute -> Layer attribute).  However, the latter might not directly work in 2016.1 due to a known bug.  To make the second option work in 2016.1, you'll have to create a temporary object attribute with the same name as your rule attribute, then try to connect the attribute to OBJECTID through the layer attribute, and then go back and delete the object attribute with the same name as your rule attribute.

0 Kudos