Select to view content in your preferred language

Export individual objects based on attribute or characteristic from the rule

1400
3
01-18-2017 04:02 AM
EleSer
by
Deactivated User

I have not found a way to export specific sets of 3d objects individually. For example export first all the trees, then all the buildings, then all the sidewalks, then all the roads etc. Instead CE exports everything that gets generated from the rules within a lot. Is there any way to export sets of objects?

If there isn't I was thinking if with a python script that could be possible. Any ideas please?

What I tried so far is that I added in the rule something like that:

Building -->
      report ("Layer", "Building")

      extrude (height)

So when I export it in a geodatabase as a multipatch per leaf shape I can select a building and in the attribute table there a column called "Layer" whose value is "Building". So I write queries and isolate each object category. However this is time consuming as a process. 

Please if anyone has tried something like that make a comment.

0 Kudos
3 Replies
LR
by
Frequent Contributor

ArcGIS Pro has a "Split By Attributes" tool you could use with your layer attribute.

0 Kudos
EleSer
by
Deactivated User

Hi LR,

Thanks for the comment. Please could you elaborate a bit more? I am not familiar with ArcGIS Pro, that why. 

I am not sure though if you can split by attributes because the attribute is assigned to a lot and not to a building in CityEngine. However,I am open to your suggestion if you could guide me through a bit.

Thanks a lot!

0 Kudos
LR
by
Frequent Contributor

Puh. I'll try  

You basically already did the required stuff: add reporting to your rules so buildings, trees, etc. report what they are (layer). Exporting as One Feature Per Leaf Shape means every object generated in the lot, whether it's a building or a tree, is a separate entity, with its reported value(s) as attribute.

What's left is opening the GDB in AGP and running the geoprocessing tool "Split by Attribute", like in ArcMap. If you use your "Layer" attribute as split attribute, you'll end up with two new layers in the DB, one containing the trees and one containing the buildings:

0 Kudos