Script based export and questions

Discussion created by rhexter on Mar 4, 2012
Latest reply on Mar 5, 2012 by AUlmer-esristaff
Hey guys,
I'm evaluating CE currently for use on a project, prior to our purchase.
I'm needing to setup a pipeline that looks very similar to the UDK export instances one that I've found from the old Proceedural site in Googles cache.
Okay, so being on the trial I can not access the export functions to try them out ( a key part of my evaluation) :(

Anyway, I have setup the reporting cga rule from the old example,
I generate a building
I look in the inspector at the reports section and it contains the information I expect to see, YAY!

Now to Python


sel=ce.selection()[0] #gives me a shape 'sel'

sel.getReports()['asset'] #suggests that the Shape object returned has a getReports method that generates a dictionary, no?
reportDict=sel.getReport() #I get no return from this at all.. yet the shape does have report data displaying in the Inspector I certainly don't get a dictionary returned?

sel.getReport().has_key('asset') #causes city engine to lock up, it never comes back so I have to kill it, I guess this should not happen?
sel.getReport(). #is where it locks up as soon as I hit the 'g' key to enter 'get_key'

SO these are things I need to evaluate, I need to look at the data that I can generate, obviously without access to the exporters, however this is not appearing to work, is this buggy trialware only?

I see the following demonstrated in the examples from the old pages:

using an instance of the class Model


Can Model be used within the city Engine python script Console?
Is 'modelUUID' the equivalent of the 'shapeUUID' that I can return from my shape I generate within the City Engine? 

I find no mention of using Class instances in the APi docmentation, is this possible, being a standard part of python?

I assume you are using module based globals within the exportInstances.py script examples to pass data from one function to another?
i.e. one catalogs as the exporter iterates through shapes in the scene and the other uses the data gathered and runs the finishExport() after the export process has completed

from finishModel() to finishExport()

I assume that finishModel() is always run before finishExport()?

Am i able to use Class Instances that contain more complex data structures within the global scope of these export scripts?

Am I able to run both and fbx export for unique geometry as well as handle instances as described above in one export step or is is a case of having to run multiple export steps to extract specific data from the scene at each export step?

How do I tear off windows? this is very annoying everything being docked?

Are you going to be moving this to be more pythonic ie object orientated?
shape.getAttribute('height') # is more intuitive than current

ce.getAttribute(ce.selection(), 'height')