zoukankan      html  css  js  c++  java
  • arcgis python 获得所有的工具名称

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

  • 相关阅读:
    公有云数据库服务的申请与使用
    linux集群
    shell基础知识
    LNMP环境配置
    LAMP环境搭建与配置
    12月17日linux学习
    12月16日linux学习(文档的压缩与打包)
    12月13、14号linux学习
    12月12日linux学习
    目录结构
  • 原文地址:https://www.cnblogs.com/gisoracle/p/3394037.html
Copyright © 2011-2022 走看看