ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Ayuda
  • Sign Out
ArcGIS Desktop

ArcGIS Online

La plataforma de representación cartográfica para tu organización

ArcGIS Desktop

Un completo SIG profesional

ArcGIS Enterprise

SIG en tu empresa

ArcGIS for Developers

Herramientas para crear aplicaciones basadas en la ubicación

ArcGIS Solutions

Plantillas de aplicaciones y mapas gratuitas para tu sector

ArcGIS Marketplace

Obtén aplicaciones y datos para tu organización.

  • Documentación
  • Soporte
Esri
  • Iniciar sesión
user
  • Mi perfil
  • Cerrar sesión

ArcMap

  • Inicio
  • Introducción
  • Cartografiar
  • Analizar
  • Administrar datos
  • Herramientas
  • Extensiones

ValidateTableName

  • Resumen
  • Sintaxis
  • Muestra de código

Resumen

Takes a table name and a workspace path and returns a valid table name for the workspace. An underscore "_" will replace any invalid character found in the table name and will honor the name restrictions for the workspace. The table name restrictions depend on the specific RDBMS used.

Sintaxis

ValidateTableName (name, {workspace})
ParámetroExplicaciónTipo de datos
name

The table name to be validated.

String
workspace

The optional workspace against which to validate the table name.

If the workspace is not specified, the table name is validated using the current workspace environment. If the workspace environment has not been set, the table name is validated based on a folder workspace.

String

Valor de retorno

Tipo de datosExplicación
String

The valid table name for the workspace, based on name restrictions of the workspace.

Muestra de código

ValidateTableName example

Returns a valid table name for the workspace.

import os
import arcpy

# Get the input and output workspaces
#
arcpy.env.workspace = arcpy.GetParameterAsText(0)
out_workspace = arcpy.GetParameterAsText(1)

# Get a list of input feature classes to be copied and copy
#  to new output location
#
for fc in arcpy.ListFeatureClasses():
    out_fc = arcpy.ValidateTableName(fc, out_workspace)
    arcpy.CopyFeatures_management(
        fc, os.path.join(out_workspace, out_fc))

Temas relacionados

  • ParseTableName
  • ValidateFieldName
  • Validar nombres de tabla y de campo en Python

ArcGIS Desktop

  • Inicio
  • Documentación
  • Soporte

Plataforma ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

Acerca de Esri

  • Quiénes somos
  • Empleo
  • Blog de Esri
  • Conferencia de usuarios
  • Cumbre de desarrolladores
Esri
Díganos su opinión.
Copyright © 2019 Esri. | Privacidad | Legal