Select to view content in your preferred language

Python to import FGDB in CityEngine: is it possible to select the layer to import?

1656
2
02-02-2017 05:12 AM
NatanMicheletti1
Emerging Contributor

Hello,

I am trying  to automate a workflow where I import data from different file geodatabase in CityEngine and export the generated models. For that I am writing some python scripts, exploiting the CE() functions.

The geodatabases have various feature classes in them, and I would like to select which one(s) to import as one can do in the GUI but with python, e.g. with some parameter in the FGDBImportSettings. However, in the available commands I can't find the appropriate parameter to set the names of the feature classes to import. How can it be done?

Thank you in advance!

Best regards,

Natan

0 Kudos
2 Replies
ThomasFuchs
Esri Regular Contributor

In the FGDBImportSettings you find the option:

setDatasetFilter(self, datasetPaths)
Set a list of dataset paths to include in the import. 
If empty (= default), all valid datasets will be imported.
 
datasetPaths: List of case-sensitive dataset paths (using forward slash as delimiter), 
e.g. ['/MyFeatureDatataset/Parcels'] .

This allows to filter for specific layers.

0 Kudos
NatanMicheletti1
Emerging Contributor

Thank you for your answer!

I was working on CE 2015.1, which apparently does not have this option. I checked in an instance of CE 2016.1 and I found it.

Thank you for your help and best regards,

Natan 

0 Kudos