打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
arcgis 获得工具有多少个

import  arcgisscripting

import  string;

gp = arcgisscripting.create(9.3);

##多少个工具箱

toolboxes = gp.listToolboxes();

for toolbox in toolboxes:

    #截取工具箱的别名

    first = string.find(toolbox,"("); ##第一个'('的索引值

    end = string.find(toolbox,")")    ##最后一个')'的索引值

    toolboxAlias = toolbox[first+1:end]; ##工具箱的别名

    gp.AddMessage(toolboxAlias);

    i = 0;

    tools = gp.listTools();

    for tool in tools:

        f =  string.find(tool,"_"); ##"_"的索引值

        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)));

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Google Earth KML数据格式转换成Shp数据格式
正则匹配连续三个数字
Java版的实现JavaScript中的eval()函数
如何使用ArcGIS Pro进行坡度和坡向分析
C# string 中的 @
string str=null与 string str=""区别
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服