arcgis 获得工具箱工具的个数
2024-10-18 04:27:41
import arcgisscripting import string; gp = arcgisscripting.create(9.3); ##多少个工具箱 toolboxes = gp.listToolboxes(); for toolbox in toolboxes: #截取工具箱的别名 first = toolbox.index("("); ##第一个'('的索引值 end = toolbox.index(")") ##最后一个')'的索引值 toolboxAlias = toolbox[first+1:end]; ##工具箱的别名 gp.AddMessage(toolboxAlias); i = 0; tools = gp.listTools(); for tool in tools: f = tool.index("_"); ##"_"的索引值 alias = tool[f+1:]; if alias == toolboxAlias: gp.AddMessage( tool); i=i+1; gp.AddMessage( "====="+toolbox+"'s count:"+str(i)); gp.AddMessage( "the tool count:"+str( len(tools))); gp.AddMessage( "the toolbox count:"+str(len(toolboxes)));
最新文章
- 使用adagio包解决背包问题
- C++程序内存泄漏检测方法
- Eclipse下Android开发错误之Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace
- listview java.lang.ArrayIndexOutOfBoundsException:
- [原]常用sqlserver数据库使用sql语句
- 【Java设计模式】单例模式
- hdu 5206 Four Inages Strategy
- JAXB - Calling marshal
- 温故而知新 C++ 类型转换
- centos6.5 升级python 到 python 2.7.11 安装 pip
- Snail’s trouble
- ajax_get/post_两级联动
- 通过url获取相应的location信息
- api-gateway实践(15)3.6JL分支和3.7并行改造需求
- UNIX环境高级编程——创建孤儿进程
- emWin仪表界面设计,含uCOS-III和FreeRTOS两个版本
- 四、Mysql主从同步
- Multi-Fiber Networks for Video Recognition (MFNet)
- Redis学习系列五Set(集合)
- hdu5242 Game (贪心+dfs序)