POST
|
I'm not perfectly sure if I understood correctly, but I gues this is what you need : ce.setAttributeSource() check the Help Menu for the Python docs under : CityEngine Help > Python Scripting > Scripting Interface Usage > Commands by Category and search for that command. does this work ? Yes! With your suggestion,I've solved the problem smoothly,thanks for your help,matthiasbuehler! gouzhun
... View more
03-10-2012
10:43 PM
|
0
|
0
|
385
|
POST
|
HI, I want to batch export my model from cityengine without setting attr in UI,but in the py script I don't know how to bind the shape attr to rules attr. please help! thanks! gouzhun
... View more
03-06-2012
10:56 PM
|
0
|
2
|
3001
|
POST
|
hi we have analyzed your shapefiles and scripts. there are two things to note: 1) CityEngine uses the java memory management. this means that CityEngine can allocate up to a certain amount of memory for all scene objects. this is specified in CityEngine.ini with the "-Xmx700M" switch. only when this amount is filled up, the java garbage collector will start to remove unused memory, for example when the python script imports another shape file. this explains the behaviour you see on your system: although your memory indicator shows that CityEngine has used a lot of memory, it is still available inside CityEngine for further operations. note that models generated by CGA and the model exporter operate outside the java memory. 2) in CityEngine 2010.3 and CityEngine 2011 there is indeed a memory leak when a scene is closed or a new scene is created. we have logged the issue and will try to fix it for the next service release. we are sorry for the inconvenience. kind regards, simon Hi,Simon! The memory LEAK really makes me upset,hoping you fix it asap! gouzhun
... View more
02-12-2012
03:32 PM
|
0
|
0
|
912
|
POST
|
Hi,Matthias! I have disabled the RCP Logger ,but still memory leak!
... View more
11-30-2011
01:16 AM
|
0
|
0
|
912
|
POST
|
OK,Thx! The 2011.1 release had solved this problem,Right??
... View more
11-28-2011
07:47 PM
|
0
|
0
|
912
|
POST
|
Hi Gou ! Can you tell me precisely what OS you are using (amount of RAM / 32|64 bit / ..) ? The CityEngine caches (keeps in memory) assets and textures, thus it may be if you are frequently exchanging assets that your memory decreases. What may also help you is to delete from time to time the existing models via RMB > Delete Models. Did you see the recommended (and minimum) system requirements here ? http://resources.arcgis.com/content/cityengine/system-requirements Please let me know. HI,Matthias Thx for replying! My OS is higher than the Software Requirements and Recommendations .I've been working a lot in CityEngine recently,So what you said I have tried,but NOT working! I did it by a Python Script which batch exporting my models,Here is the script! import os,sys
def list_file(rootpath):
i=0
for path in os.listdir(rootpath):
absolutepath=os.path.join(rootpath,path)
if os.path.isdir(absolutepath):
list_file(absolutepath)
else:
if os.path.splitext(path)[1][1:] =="shp":
ImportAndGenerate(rootpath+"\\"+path,i,path[0:3])
i=i+1
def ImportAndGenerate(pathstr,i,path):
ce.importFile(pathstr, settings)
object = ce.getObjectsFrom(ce.scene, ce.withName("'Shapefile Lot'"))
ce.setSelection(object)
ce.setStartRule(ce.selection, "Lot")
#object=ce.getObjectsFrom(ce.selection)
ce.setRuleFile(ce.selection, "rules\ForExport\GroundFLoorExport.cga")
#ce.generateModels(object)
#ce.saveFile("rt.cej")
#ce.generateModels(object)
Export(object,path+str(i))
def Export(object,Namestr):
exportPath = ce.toFSPath("models/")
exportSettings = A3DSExportModelSettings()
exportSettings.setGranularityFile(A3DSExportModelSettings.PER_INITIAL_SHAPE)
exportSettings.setGeneralLocation(exportPath)
exportSettings.setGeneralName(Namestr)
ce.export(object, exportSettings)
ce.delete(ce.getObjectsFrom(ce.scene))
if __name__ == '__main__':
ce.newFile("rt.cej")
ce.openFile("rt.cej")
settings=SHPImportSettings()
settings.setProjection(SHPImportSettings.DisableProjection)
list_file('E:\\cityOP\\TDMap\\data\\OUT') Any problem with it!?:)
... View more
11-24-2011
03:41 AM
|
0
|
0
|
912
|
POST
|
Hello, I've been working a lot in CityEngine recently, testing out many difference grammar files on the same lot. I've noticed that as I continue doing this, the free memory slowly drops. I'm just using the one lot, and only have one model on the screen at any given time. Is there a way to free up this memory without having to restart CityEngine:eek:?
... View more
11-23-2011
08:21 PM
|
0
|
9
|
4266
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|