ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Aide
  • Sign Out
ArcGIS Desktop

ArcGIS Online

La plateforme cartographique de votre organisation

ArcGIS Desktop

Un SIG professionnel complet

ArcGIS Enterprise

SIG dans votre entreprise

ArcGIS for Developers

Outils de création d'applications de localisation

ArcGIS Solutions

Modèles d'applications et de cartes gratuits pour votre secteur d'activité

ArcGIS Marketplace

Téléchargez des applications et des données pour votre organisation.

  • Documentation
  • Support
Esri
  • Se connecter
user
  • Mon profil
  • Déconnexion

ArcMap

  • Accueil
  • Commencer
  • Carte
  • Analyser
  • Gérer les données
  • Outils
  • Extensions

ValidateTableName

  • Résumé
  • Syntaxe
  • Exemple de code

Résumé

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.

Syntaxe

ValidateTableName (name, {workspace})
ParamètreExplicationType de données
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

Valeur renvoyée

Type de donnéesExplication
String

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

Exemple de code

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))

Rubriques connexes

  • ParseTableName
  • ValidateFieldName
  • Validation des noms de tables et de champs dans Python

ArcGIS Desktop

  • Accueil
  • Documentation
  • Support

ArcGIS Platform

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

A propos d'Esri

  • A propos de la société
  • Carrières
  • Blog d’Esri
  • Conférence des utilisateurs
  • Sommet des développeurs
Esri
Donnez-nous votre avis.
Copyright © 2019 Esri. | Confidentialité | Légal