>>> startup.fantastic_module.foo()
>>> fantastic_module.foo()
Hi Andréstartup and scripting are appended to the regular python startup script in the following way:file startup.py is copied and loaded as a moduleimport startupcontent of scripting.py is appended as textresulting in: ... #loading regular api modules from jscripting.CE import * ... # user startup import startup # scripting <TEXT IN SCRIPTING.PY> (see scripting.py in directory $USER/.CityEngine/@CEVERSION/jythonCache)functions in startup need to be called with their module name, e.g.startup.myCustomFunction()two words of warning: Due to the mechanisms described above, typos/errors in both startup.py or scripting.py can break the whole Python scripting interface. Both startup.py and scripting.py are loaded ONLY on CityEngine start. When changing these files, make sure to restart CE.Hope that helpsAndreas
... #loading regular api modules from jscripting.CE import * ... # user startup import startup # scripting <TEXT IN SCRIPTING.PY>
startup.myCustomFunction()
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.