Zusammenfassung
Creates a schematic folder in a schematic dataset or schematic folder.
Verwendung
The output schematic folder must not exist. (The Overwrite output of geoprocessing setting has no effect.)
Syntax
CreateSchematicFolder_schematics (out_location, out_name)
Parameter | Erläuterung | Datentyp |
out_location | The schematic dataset or schematic folder in which the folder will be created. This container must already exist. | Schematic Dataset;Schematic Folder |
out_name | Name of the output schematic folder. | String |
Codebeispiel
CreateSchematicFolder example (Stand-alone Python script)
Create a schematic folder and subfolder in a schematic dataset.How to run this Python script example:
- Start ArcCatalog.
- Copy and paste the following script in the Python window.
- Press ENTER.
# Name: CreateSchematicFolder.py
# Description: Create a schematic folder and subfolder
# Requirement: Erweiterung "ArcGIS Schematics"
# import system modules
import arcpy
msgNoLicenseAvailable = "Erweiterung "ArcGIS Schematics" license required"
try:
# Checks out the Erweiterung "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 Erweiterung "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)
Umgebungen
Dieses Werkzeug verwendet keine Geoverarbeitungsumgebungen.
Lizenzinformationen
- ArcGIS Desktop Basic: Erfordert Schematics
- ArcGIS Desktop Standard: Erfordert Schematics
- ArcGIS Desktop Advanced: Erfordert Schematics