Create An Empty Customer Layer (Business Analyst)

汇总

Creates a new empty point feature class (customer layer). You can define fields to be created in the new layer.

用法

语法

CreateEmptyCustomerLayer_ba (OutputFeatureClass, {FldsCollection}, {NameField}, {LinkField})
参数说明数据类型
OutputFeatureClass

The feature class that will contain the customer features.

Feature Class
FldsCollection
(可选)

Fields to add to the output feature class.

String
NameField
(可选)

The field that will identify the customer name.

String
LinkField
(可选)

Unique ID linking the customer file with the store file.

String

代码示例

CreateEmptyCustomerLayer Example (Stand-alone Script)
# Name: CreateEmptyCustomerLayer.py
# Description: Creates a new empty customer layer.
# Author: ESRI

# Import system modules
import arcview
import arcpy

arcpy.ImportToolbox("C:\Program Files\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
 
try:
# Acquire extension license 
arcpy.CheckOutExtension("Business")
 
# Defines the parameters for the Create an Empty Customer Layer tool
OutPath = "C:/temp/New_Customers.shp"
StoreId = "ID"
Name= "Address"
FldCol = "Name:ID|Alias:ID|Type:esriFieldTypeSmallInteger|Precision:1;Name:Address|Alias:Address|Type:esriFieldTypeString|Precision:40"
 
# Creates a new feature class (Customer Layer) with empty attribute fields
arcpy.CreateEmptyCustomerLayer_ba(OutPath, FldCol, Name, StoreId)
 
# Release extension license 
arcpy.CheckInExtension("Business") 
 
except:
  print arcpy.GetMessages(2)

环境

此工具不使用任何地理处理环境

相关主题

许可信息

ArcView: 需要 Business Analyst
ArcEditor: 需要 Business Analyst
ArcInfo: 需要 Business Analyst

10/4/2010