<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cannot add coded values to Domains for SDE Enterprise Geodatabase using .py Example in ArcGIS Collector Questions</title>
    <link>https://community.esri.com/t5/arcgis-collector-questions/cannot-add-coded-values-to-domains-for-sde/m-p/1177183#M13645</link>
    <description>&lt;P&gt;It does not make sense, because the example in the same documentation states:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Process: Create the coded value domain
    arcpy.CreateDomain_management("montgomery.gdb", domName, "Valid pipe materials", "TEXT", "CODED")
    
    #Store all the domain values in a dictionary with the domain code as the "key" and the 
    #domain description as the "value" (domDict[code])
    domDict = {"CI":"Cast iron", "DI": "Ductile iron", "PVC": "PVC", \
                "ACP": "Asbestos concrete", "COP": "Copper"}
    
    # Process: Add valid material types to the domain
    #use a for loop to cycle through all the domain codes in the dictionary
    for code in domDict:        
        arcpy.AddCodedValueToDomain_management(gdb, domName, code, domDict[code])
    
    # Process: Constrain the material value of distribution mains
    arcpy.AssignDomainToField_management(inFeatures, inField, domName)&lt;/LI-CODE&gt;&lt;P&gt;are those, two different syntaxes for the same implementation? or are two different implementations?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 May 2022 13:45:35 GMT</pubDate>
    <dc:creator>Cristian_Galindo</dc:creator>
    <dc:date>2022-05-25T13:45:35Z</dc:date>
    <item>
      <title>Cannot add coded values to Domains for SDE Enterprise Geodatabase using .py Example</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/cannot-add-coded-values-to-domains-for-sde/m-p/476355#M8172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to add coded values to a new created domain using Arcpy in ArcCatalog but I keep getting this strange error. The domain gets created but the coded values generate an error. I used this exact python tool for a local file geodatabase with no issues so I don't understand why there would be problems with an enterprised geodatabase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Software:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ArcGIS Desktop version&lt;SPAN&gt;: 10.3.1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Enterprise Geodatabase version: 10.3.1&lt;/P&gt;&lt;P&gt;SQL 2012&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Code:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;from arcpy import env&lt;/P&gt;&lt;P&gt;domName = "test"&lt;BR /&gt;gdb = "GIS.sde"&lt;/P&gt;&lt;P&gt;env.workspace = "C:\Users\jnmiller\AppData\Roaming\ESRI\Desktop10.3\ArcCatalog"&lt;BR /&gt;arcpy.CreateDomain_management(gdb, domName, "Test Materials", "TEXT", "CODED")&lt;/P&gt;&lt;P&gt;domDict = {"CI":"Cast iron", "DI": "Ductile iron", "PVC": "PVC", \&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"ACP": "Asbestos concrete", "COP": "Copper"}&lt;BR /&gt; &lt;BR /&gt;for code in domDict: &lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arcpy.AddCodedValueToDomain_management(gdb, domName, code, domDict&lt;PRE&gt;)&lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Error: Why does this list every single domain already created in the database?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Runtime error Traceback (most recent call last): File "&amp;lt;string&amp;gt;", line 10, in &amp;lt;module&amp;gt; File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\management.py", line 1317, in AddCodedValueToDomain raise e ExecuteError: ERROR 000800: The value is not a member of Gas Service Diameter Plastic PVC | Rectifier Manufacturer | Work Order Status | GasASTMF2897CSteelPipeType | Pipe Diameter Plastic PVC | Leak Survey Frequency | ILI Survey Ext Indicator | Pipe Crossing Piped Utility | Gas Service Diameter Plastic PE | Pass Fail | YesNo Indicator with NA | CompanyID | Length Source | HCA Area Class | Pipe Diameter Units | Regulator Casing Material | UnitsForPressure | Leak Cause Material | ExcavDam Damage Type | HCAProvenance | PipelineMarker Condition | ExcavDam Work Type | Pipe Non-Steel Seam Type | Coating Condition | Regulator Body Types | GASASTMF2897Regulator | GasASTMF2897EFV | Item Number Pipe | ControllineManufacturer | GasASTMF2897ComponentMaterial | Method Detected Type | Compressor Station Type | Yes No Indicator | Gas Pipe Diameter Cast Iron | GasASTMF2897PlasticPipeType | Pipe Diameter | Odorizer Manufacturer | Gas Flow | Anomaly Remediation | Soil Type | System Names | Coating Type | PipeGrade | Rectifier Type | Rectifier Cable Gauge | Leak Location | Gas Service Diameter Plastic ABS | Leak Cause | Leak Class | Valve Use Type | GasASTMF2897CouplingType | Pipe Casing Protection Type | Could Affect Intersection Type | Dehydration Method | Pilot Connect Type | Meter Manufacturers | Valve Model | Gas Pipe Manufacturer | Pipe_WallthicknessSteel | Pipe Casing End Connection | Regulator Type | Test Point Type | On Off Status | Pipe Metallic Seam Type | Gas Pipe Diameter Copper | Pipe Facility Status | Wellhead Material Class | Gas Pipe Diameter Plastic ABS | Regulator Manufacturer | Gas Pipe Diameter Wrought Iron | GasASTMF2897Anodes | Leak Survey Work Order Type | Leak Survey Type | GasASTMF2897Elbows | Gas Pipe Diameter Ductile Iron | Pipe Casing Reason | Surface Type | Leak Cause Corrosion | Leak Facility Type | Leak Closed Status | Meter Type | Leak Method Detected Type | Marker Type | ExcavDam Root Cause | Item Number EFV | PipeWallThickness | Pipe Type | Gas Service Diameter Coated Steel | Operating Status | GasASTMF2897_Manufacturer | Anomaly Priority | Fitting Manufacturer | Document Maturity Index | Anomaly Type | GasASTMF2897SteelPipeMaterial | Inspection Range Type | Item Number Shortstop | Valve Material | Valve Type | DocumentType | GasASTMF2897CompositePipeMaterial | PipePressureRating | GasASTMF2897Transitions | Operating Classification | Gas Pipe Diameter Units | Leak Repair Type | Consequence Area Type | CP System Protection Type | Gas Pipe Diameter Plastic | Station Pipe Diameter | Pipe Casing Diameter | Pipe Fitting Material | Leak Inspect GasIn | AnnotationStatus | ILI Survey Marker Type | EFV Diameter | Gas Service Diameter Bare Steel | Gas Pipe Diameter Bare Steel | PipeMaterial | Gas Service Diameter Cast Iron | Pipe Casing Fill Type | Gas Service Diameter Plastic Other | Valve Position | GasASTMF2897Valve | Pipe Crossing Topographic | Structures Limited Mobility Reason | Leak Work Performed | Wellhead Diameter | Anomaly Severity | Time Classification | dLRSNetworks | GasASTMF2897Tees | ILI Survey Type | Corrosion Condition | Vault Material | Spatial Accuracy | Could Affect Type | Wellhead Connection type | ValueMethod | Fitting Style | PipeTestType | Product Commodity Type | Pipe Connection Type | UnitsForDiameter | Item Number Meter | HS LS | Line Valve Connection Type | Structure Types | GasASTMF2897IronPipeMaterial | GasASTMF2897CopperPipeMaterial | dActivityType | Strainer Device Type | DA Survey Type | Valve Diameter | Pipe Install Method | Alignment Sheet Type | Leak Cause Excavation | Pipe Outside Diameter Coated Steel | Pressure Test Type | Odorizer Size | Gas Pipe Diameter Composite | CP System Status | Pressure Monitor Device Manufacturer | CP Color Code | Strainer Manufacturer | HCA Area Type | StrainerModel | Anode Weight | Pipe Fitting Diameter | Pipe Crossing Wired Utility | DOTClassType | Pipe Outside Diameter Bare Steel | Leak Survey Method | ControlLineModel | Material4 | GasASTMF2897Strainers | Wellhead Pressure Rating | Recording Method | Anode Material Type | CP Bond Junction Type | Wellhead Type | PipeEditResponse | Gas Service Diameter Wrought Iron | Anomaly Status | Gas Service Diameter Ductile Iron | GasASTMF2897PlasticPipeMaterial | EnabledDomain | Test Point Num Wires | Pipe System Type | GasASTMF2897EndCap | VerticalAlignment | InspRemediation | Gas Service Diameter Copper | UnitsForLength | BooleanDomain | Pressure Test Medium | PipeManufacturer | DOTClassSource | Identified Site Outside Area | Pressure Established By | InspectionNote_Type | Company ID | IdentifiedIssue | PipeCondition | States | Corrosion Extent | Pipe Crossing Location | Operating Type | GasASTMF2897BSteelPipeType | ExcavDam Resp Party Type | Gas Pipe Diameter Coated Steel | ExcavDam Equip Cause Damage | Present Status | PipelineMarker | Over Pressure Protection Type | Pipe Crossing Transportation | Pipeline Operator | AncillaryRoleDomain | BooleanSymbolValue | System Numbers | Object Status | GasASTMF2897Reducers | Pipe Material | Valve Manufacturer | Leak Force NatForce. &lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2017 11:56:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/cannot-add-coded-values-to-domains-for-sde/m-p/476355#M8172</guid>
      <dc:creator>JordanMiller4</dc:creator>
      <dc:date>2017-09-27T11:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot add coded values to Domains for SDE Enterprise Geodatabase using .py Example</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/cannot-add-coded-values-to-domains-for-sde/m-p/1157162#M13612</link>
      <description>&lt;P&gt;I found that the arcpy command syntax was the issue.&lt;/P&gt;&lt;P&gt;Replace the following arcpy commands:&lt;BR /&gt;arcpy.CreateDomain_management with &lt;STRONG&gt;arcpy.management.CreateDomain&lt;/STRONG&gt;&lt;BR /&gt;arcpy.AddCodedValueToDomain_management with &lt;STRONG&gt;arcpy.management.AddCodedValueToDomain&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;See the syntax here: &lt;A href="https://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/create-domain.htm" target="_blank"&gt;https://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/create-domain.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 07:01:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/cannot-add-coded-values-to-domains-for-sde/m-p/1157162#M13612</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2022-03-24T07:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot add coded values to Domains for SDE Enterprise Geodatabase using .py Example</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/cannot-add-coded-values-to-domains-for-sde/m-p/1177183#M13645</link>
      <description>&lt;P&gt;It does not make sense, because the example in the same documentation states:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Process: Create the coded value domain
    arcpy.CreateDomain_management("montgomery.gdb", domName, "Valid pipe materials", "TEXT", "CODED")
    
    #Store all the domain values in a dictionary with the domain code as the "key" and the 
    #domain description as the "value" (domDict[code])
    domDict = {"CI":"Cast iron", "DI": "Ductile iron", "PVC": "PVC", \
                "ACP": "Asbestos concrete", "COP": "Copper"}
    
    # Process: Add valid material types to the domain
    #use a for loop to cycle through all the domain codes in the dictionary
    for code in domDict:        
        arcpy.AddCodedValueToDomain_management(gdb, domName, code, domDict[code])
    
    # Process: Constrain the material value of distribution mains
    arcpy.AssignDomainToField_management(inFeatures, inField, domName)&lt;/LI-CODE&gt;&lt;P&gt;are those, two different syntaxes for the same implementation? or are two different implementations?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 13:45:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/cannot-add-coded-values-to-domains-for-sde/m-p/1177183#M13645</guid>
      <dc:creator>Cristian_Galindo</dc:creator>
      <dc:date>2022-05-25T13:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot add coded values to Domains for SDE Enterprise Geodatabase using .py Example</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/cannot-add-coded-values-to-domains-for-sde/m-p/1177457#M13649</link>
      <description>&lt;P&gt;Same kind of question here:&amp;nbsp;&lt;A href="https://community.esri.com/t5/python-questions/arcpy-management-lt-gp-tool-gt-vs-arcpy-lt-gp-tool/td-p/66673" target="_blank"&gt;https://community.esri.com/t5/python-questions/arcpy-management-lt-gp-tool-gt-vs-arcpy-lt-gp-tool/td-p/66673.&lt;/A&gt;&amp;nbsp; So I guess it is the same implementation, but with different syntax.&amp;nbsp; The old syntax broke my GP tool that I created in Pro, but changing it to the new syntax made it work.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 07:58:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/cannot-add-coded-values-to-domains-for-sde/m-p/1177457#M13649</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2022-05-26T07:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot add coded values to Domains for SDE Enterprise Geodatabase using .py Example</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/cannot-add-coded-values-to-domains-for-sde/m-p/1177884#M13651</link>
      <description>&lt;P&gt;I understand that now your GP tool work....How, if the the implementation and the tool are the same, the syntax breaks that, moreover, when the errors shows, that something was executed, therefore it was not something related with python syntax.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 09:32:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/cannot-add-coded-values-to-domains-for-sde/m-p/1177884#M13651</guid>
      <dc:creator>Cristian_Galindo</dc:creator>
      <dc:date>2022-05-27T09:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot add coded values to Domains for SDE Enterprise Geodatabase using .py Example</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/cannot-add-coded-values-to-domains-for-sde/m-p/1177888#M13652</link>
      <description>&lt;P&gt;Well, I'm also not sure why the "modern" version of the syntax resolved my issue, but that was the only way I could get the tool to work.&amp;nbsp; What I also found was the autocomplete for the commands in the Python console in Pro automatically selects the modern syntax as specified in the parameters for the tool in all the docs.&amp;nbsp; Hopefully, someone from Esri can give us more insight into the issue.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 09:54:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/cannot-add-coded-values-to-domains-for-sde/m-p/1177888#M13652</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2022-05-27T09:54:11Z</dc:date>
    </item>
  </channel>
</rss>

