摘要
在逻辑示意图数据集或逻辑示意图文件夹中创建逻辑示意图文件夹。
用法
- 不得存在输出逻辑示意图文件夹。(地理处理设置的覆盖输出不起作用。) 
语法
CreateSchematicFolder_schematics (out_location, out_name)
| 参数 | 说明 | 数据类型 | 
| out_location | 要在其中创建文件夹的逻辑示意图数据集或逻辑示意图文件夹。此容器必须已经存在。 | Schematic Dataset;Schematic Folder | 
| out_name | 输出逻辑示意图文件夹的名称。 | String | 
代码示例
CreateSchematicFolder 示例(独立 Python 脚本)
在逻辑示意图数据集中创建逻辑示意图文件夹和子文件夹。以下 Python 脚本示例的运行方法:
- 启动 ArcCatalog。
- 将以下脚本复制并粘贴到 Python 窗口。
- 按 ENTER 键。
# Name: CreateSchematicFolder.py
# Description: Create a schematic folder and subfolder
# Requirement: ArcGIS Schematics 扩展模块
# import system modules
import arcpy
msgNoLicenseAvailable = "ArcGIS Schematics 扩展模块 license required"
try:
    # Checks out the ArcGIS Schematics 扩展模块 licence
    if arcpy.CheckExtension("Schematics") == "Available":
        arcpy.CheckOutExtension("Schematics")
    else:
        raise Exception(msgNoLicenseAvailable)
    # Sets environnement settings
    arcpy.env.overwriteOutput = True
    arcpy.env.workspace = "C:\ArcGIS\ArcTutor\Schematics\Schematics_In_ArcMap\ElecDemo.gdb"
    # Creates a new schematic folder, MySchematicRootFolder, at the ElecDemo schematic dataset root.
    arcpy.CreateSchematicFolder_schematics("ElecDemo", "MySchematicRootFolder")
    # Creates a schematic subfolder, MySchematicSubFolder, in a schematic folder, MySchematicRootFolder.
    arcpy.CreateSchematicFolder_schematics("ElecDemo\MySchematicRootFolder", "MySchematicSubFolder")
    # Returns the ArcGIS Schematics 扩展模块 licence
    arcpy.CheckInExtension("Schematics")
   
    print "Script completed successfully"
except Exception as e:
    # If an error occurred, print line number and error message
    import traceback, sys
    tb = sys.exc_info()[2]
    print "An error occured on line %i" % tb.tb_lineno
    print str(e)
环境
此工具不使用任何地理处理环境。
许可信息
- ArcGIS Desktop Basic: 需要 Schematics
- ArcGIS Desktop Standard: 需要 Schematics
- ArcGIS Desktop Advanced: 需要 Schematics