Scripted export model per leaf shape

526
5
08-27-2021 11:09 AM
AndrewDeighton
New Contributor II

I need to export some generated models to multipatch format using the per leaf shape option.

I have no problem doing this through the UI, but I need to automate the process.

Is there a complimentary function available in the Python scripting interface to do this automatically?

Tags (4)
0 Kudos
5 Replies
JonasObertuefer
Esri Contributor

Hi @AndrewDeighton,

If I understand you correctly you did use the SLPK Exporter (Export Models -> Esri Scene Layer Package) in the UI. For the SLPK Exporter there is the SPKMeshExportModelSettings() available in the python scripting interface, see:

Hope this helps.

Cheers
Jonas

0 Kudos
AndrewDeighton
New Contributor II
@JonasObertuefer wrote:

Hi @AndrewDeighton,

If I understand you correctly you did use the SLPK Exporter (Export Models -> Esri Scene Layer Package) in the UI. For the SLPK Exporter there is the SPKMeshExportModelSettings() available in the python scripting interface, see:

Hope this helps.

Cheers
Jonas


Hi Jonas,

Thanks for the reply!

I'm using the FileGDB exporter as it seems to be the easiest 3D format to manipulate in ArcGIS and non-ArcGIS applications.

From the UI, the exporter allows me to set the granularity to "per leaf shape".

I have already scripted the majority of the export in Python, but can't figure out how to set this "per leaf shape" flag in Python using FGDBExportModelSettings().

I should have mentioned I'm using CityEngine 2020 under an advanced license.

Cheers,

Andy

 

0 Kudos
JonasObertuefer
Esri Contributor

Hi Andy,

Currently the "per layer options" settings of the FileGDB exporter can't be set via the python scripting interface. So, right now the only option to set the feature granularity in python is by using the SLPK Exporter, maybe you can build your workflow around it?

Best,

Jonas

0 Kudos
AndrewDeighton
New Contributor II

Hi Jonas,

Thanks again for the reply.

I've researched a little into the SLPK format and it seems that with this format, after export I cannot convert to multipatch or any other 3D format that can be interrogated/ manipulated in Python (needed for my workflow).

I've been toying with the idea of converting my .CGA rule files to RPKs and running them though PYPRT and setting the start rule annotation to the following:

@Out (granularity=separatedShapes)

Would this create the desired per leaf shape output?

I have map controlled attributes, would they still function?

All the best,

Andy

0 Kudos
JonasObertuefer
Esri Contributor

Hi again, Unfortunately @Out (granularity=separatedShapes) is ignored by PyPRT. So, I don't see any other option than using the UI exporter at the moment.

 

0 Kudos