CityEngine python commands in external IDE?

2809
7
Jump to solution
02-01-2016 06:56 AM
CarlBester1
New Contributor II

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

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
CherylLau
Esri Regular Contributor

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.

View solution in original post

7 Replies
MatthewBaber
Esri Contributor

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

0 Kudos
CarlBester1
New Contributor II

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

0 Kudos
CherylLau
Esri Regular Contributor

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.

ChristianShiel1
New Contributor III

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?

0 Kudos
ChristianShiel1
New Contributor III

PS I assume the same applies to the c++ SDK? (ie It can be used to extend the GUI but not make external calls).

0 Kudos
ThomasFuchs
Esri Regular Contributor

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.

0 Kudos
ChristianShiel1
New Contributor III

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.

0 Kudos