サマリー
フィーチャクラスまたはテーブル フィールドから属性ドメインの関連付けを解除します。
使用法
- このツールで実行される操作内容は、[フィールドへのドメインの割り当て (Assign Domain To Field)] とは正反対です。フィールドからドメインを削除すると、フィールドと属性ドメイン間の関連付けが解除されます。 
- フィールドからドメインを削除すると、そのフィールドに対する属性整合性ルールがデータベースから削除されます。 
- 属性ドメインは、同じテーブル、フィーチャクラス、またはサブタイプの複数のフィールドに関連付けることも、複数のテーブルおよびフィーチャクラスに関連付けることもできます。フィールドからドメインを削除しても、他のドメインの関連付けには影響しません。 
- ワークスペース ドメインは、ArcCatalog またはカタログ ウィンドウでも管理できます。[データベース プロパティ] ダイアログ ボックスの [ドメイン] タブを使用して、ドメインを作成および変更できます。 
- 現在のマップ レイヤーを入力テーブルの定義に使用できます。 
- [サブタイプ] パラメーターの [値の追加] ボタンは、ModelBuilder 専用です。ModelBuilder では、先のツールが実行されていないか、出力データが存在しないために、[サブタイプ] パラメーターに値が表示されない場合があります。[値の追加] ボタンを使用して、[フィールドからドメインを削除 (Remove Domain From Field)] ダイアログ ボックスに所定の値 (1 つまたは複数) を追加して完了した後、モデルの作成を続行できます。 
構文
RemoveDomainFromField_management (in_table, field_name, {subtype_code})| パラメーター | 説明 | データ タイプ | 
| in_table | 削除対象の属性ドメインを格納する入力テーブル | Table View | 
| field_name | 属性ドメインとの関連付けが解除されたフィールド | Field | 
| subtype_code [subtype_code,...] (オプション) | 属性ドメインとの関連付けが解除されたサブタイプ コード (1 つまたは複数) | String | 
コードのサンプル
Remove Domain from Field (フィールドからドメインを削除) の例 (Python ウィンドウ)
次の Python ウィンドウ スクリプトは、RemoveDomainfromField (フィールドからドメインを削除) 関数をイミディエイト モードで使用する方法を示しています。
import arcpy
from arcpy import env 
env.workspace = "C:/data"
arcpy.RemoveDomainFromField_management("montgomery.gdb/water/distribmains", "DIAMETER")
Remove Domain from Field (フィールドからドメインを削除) の Python 例 2 (スタンドアロン Python スクリプト)
次のスタンドアロン スクリプトでは、RemoveDomainfromField (フィールドからドメインを削除) 関数をドメイン編集ワークフローの一部として使用しています。
# Name: RemoveDomainsExample.py
# Purpose: Update an attribute domain to constrain valid pipe material values
# Import system modules
import arcpy, os
 
try:
    # Set the workspace (to avoid having to type in the full path to the data every time)
    arcpy.env.workspace = "data"
 
    # set local parameters
    inFeatures = "Montgomery.gdb/Water/DistribMains"
    inField = "MATERIAL"
    dWorkspace = "Montgomery.gdb"
    domName = "Material"
    codedValue =  "ACP: Asbestos concrete"
    codeField = "TYPE"
    descField = "DESRIPT"
    # Process: Remove the constraint from the material field
    arcpy.RemoveDomainFromField_management(inFeatures, inField)
 
    # Edit the domain values
    # Process: Remove a coded value from the domain
    arcpy.DeleteCodedValueFromDomain_management(dWorkspace, domName, codedValue)
 
    # Process: Create a table from the domain to edit it with ArcMap editing tools
    arcpy.DomainToTable_management(dWorkspace, domname, dWorkspace + os.sep + domname , codeField, descField)
 
    # Process: Delete the domain
    arcpy.DeleteDomain_management(dWorkspace, domName)
 
    # Edit the domain table outside of geoprocessing
    # and then bring the domain back in with the TableToDomain process
 
except Exception as err:
    print(err.args[0])
環境
ライセンス情報
- ArcGIS Desktop Basic: はい
- ArcGIS Desktop Standard: はい
- ArcGIS Desktop Advanced: はい