Create An Empty Store Layer (Business Analyst)
摘要
Generates a new empty point feature class (store layer). You can define fields to be created in the new empty layer.
用法
-
When data is added to your map, it will be associated with the analysis extent that's active at the time. If the active analysis extent is a study area, the layer will be added to the group layer of that study area.
-
You can change the analysis extent at any time using Set Analysis Extent on the Business Analyst menu.
-
You can add new customer features (points) to the empty store layer by using the Edit toolbar in ArcMap. Once the layer is editable, you can pushpin (add) new points.
语法
参数 | 说明 | 数据类型 |
OutputFeatureClass |
The feature class that will contain the store points. | Feature Class |
FldsCollection [[Field Name, Alias Name, Field Type, Precision],...] |
Fields to add to the output feature class. | String |
NameField (可选) |
Selects a field to be used to identify the store name. | String |
StoreIDField (可选) |
Selects a field to be used as the store ID field. | String |
UsePictureSymbol (可选) |
Inserts custom store symbology into point feature class.
| Boolean |
Image Path (可选) |
The file location containing the custom store symbology. | File |
PictureSymbolSize (可选) |
The feature class that will contain the store points. | Long |
代码实例
# Name: CreateEmptyStoreLayer.py
# Description: Creates an empty store layer.
# Author: Esri
# Import system modules
import arview
import arcpy
arcpy.ImportToolbox("C:\Program Files (x86)\ArcGIS\Desktop10.2\Business Analyst\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
try:
# Acquire extension license
arcpy.CheckOutExtension("Business")
# Defines the parameters for the Create an Empty Store Layer tool
OutPath = "C:/temp/New_Store.shp"
Name= "Address"
StoreId = "ID"
FldCol = "Name:ID|Alias:|Type:esriFieldTypeSmallInteger|Precision:1|Scale:0;Name:Address|Alias:|Type:esriFieldTypeString|Precision:40|Scale:0"
# Creates a new feature class (Store Layer) with empty attribute fields
arcpy.CreateEmptyStoreLayer_ba(OutPath, FldCol, Name, StoreId)
# Release extension license
arcpy.CheckInExtension("Business")
except:
print arcpy.GetMessages(2)