Hi guys,
Does anybody know if it is possible to import/use the CityEngine python commands in an external IDE, such as PyScriptor?
I've noticed that when you create a new Python module in CE it automatically imports all from scripting (from scripting import *).
However when I try to import scripting from PyScriptor it can't find it. Hopefully I'm just missing something small.
Any suggestions?
Thanks,
Carl
Solved! Go to Solution.
No, sorry, it is currently not possible to call CE python scripts from outside of the GUI/externally. It's good to know that there's a demand for this though, so we appreciate your post.
If you have a 3d analyst license then you should be able import certain rules packages from cityengine when using the command "import arcpy" at the beginning of the script.
I am unsure if this includes the full library of cityengine procedures, however, due to cityengine using jython not python.
example on importing rules: Features From CityEngine Rules—Help | ArcGIS for Desktop
Hi Matthew thanks for the reply.
I was actually thinking more along the lines of the CE commands.
For example:
views = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)
views[0].setCameraPosition(0, 200, 0)
More examples of the CE commands can be seen at:
http://cehelp.esri.com/help/index.jsp?topic=/com.procedural.cityengine.help/html/manual/python/jscripting/jscripting_cat.html
Thanks,
Carl
No, sorry, it is currently not possible to call CE python scripts from outside of the GUI/externally. It's good to know that there's a demand for this though, so we appreciate your post.
Thanks for clearing this up. I would like to discuss the possibility of opening up this API to be externally accessible. How do I proceed?
PS I assume the same applies to the c++ SDK? (ie It can be used to extend the GUI but not make external calls).
Could you please provide a use case for your feature request?
The CityEngine team knows some special use cases, where this can make sense, but we are still collecting more...
The C++ SDK can only provide a fraction of the CE python functionality, but here it is easier to open it up the externals IDEs.
I would like to create a tool that I can hook up cityengine with a games engine like Unity but without having to go through CityEngine GUI. For example I would want a web app that I can download an OSM file and this is put into CityEngine and then as a download comes a Unity project with the generated scene inside.