try(destroydialog CacheTool) catch() Rollout CacheTool "CACHE TOOL" width:350 height:200 --creates rollout ( editText edt_path "Export Location:" labelOnTop:true button btn_browse "Browse..." width:100 height:20 pos:[13,45] button btn_export "Export!" width:100 height:45 align:#left progressBar pb_pcache "Cache Progress" label presentacion "PointCache V1.0 WIP" align:#left pos:[13,180] on btn_browse pressed do ( folderPath = getSavePath() edt_path.text = folderPath ) on btn_export pressed do ( objeto = selection as array PPath= edt_path.text valor=0 pb_pcache.value=0 for i= 1 to objeto.count do ( PCache = Pointcache() addmodifier objeto[i] PCache objetoName = objeto[i].name makedir (PPath + "/"+objetoName) Dir= (PPath + "/"+objetoName) PCache.filename = Dir + "/"+".xml"--PPath + "/"+ objetoName + ".xml" cacheOps.RecordCache PCache collapsestack objeto[i] addmodifier objeto[i] PCache PCache.filename = Dir + "/"+".xml"--PPath + "/"+ objetoName + ".xml" valor= valor+1 pb_pcache.value= 100 *valor/objeto.count ) ) ) createDialog CacheTool