ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Create Schematic Folder

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Creates a schematic folder in a schematic dataset or schematic folder.

Usage

  • The output schematic folder must not exist. (The Overwrite output of geoprocessing setting has no effect.)

Syntax

arcpy.schematics.CreateSchematicFolder(out_location, out_name)
ParameterExplanationData Type
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

Code sample

CreateSchematicFolder example (Stand-alone Python script)

Create a schematic folder and subfolder in a schematic dataset.How to run this Python script example:

  1. Start ArcCatalog.
  2. Copy and paste the following script in the Python window.
  3. Press ENTER.

# Name: CreateSchematicFolder.py
# Description: Create a schematic folder and subfolder
# Requirement: ArcGIS Schematics extension

# import system modules
import arcpy
msgNoLicenseAvailable = "ArcGIS Schematics extension license required"

try:
    # Checks out the ArcGIS Schematics extension 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 extension 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)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Requires Schematics
  • Standard: Requires Schematics
  • Advanced: Requires Schematics

Related topics

  • An overview of the Schematics toolbox
  • Update Diagram
  • Update Diagrams
  • Convert Diagram To Features

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal