<?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: Create Feature Field in Feature Class with possibility to add values Toolbox in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/create-feature-field-in-feature-class-with/m-p/1044095#M60689</link>
    <description>&lt;P&gt;Thanks a lot for your help!&lt;/P&gt;&lt;P&gt;I now used the method with letting them navigate to FeatureClass and raster!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 May 2021 11:10:34 GMT</pubDate>
    <dc:creator>Nicola</dc:creator>
    <dc:date>2021-05-05T11:10:34Z</dc:date>
    <item>
      <title>Create Feature Field in Feature Class with possibility to add values Toolbox</title>
      <link>https://community.esri.com/t5/python-questions/create-feature-field-in-feature-class-with/m-p/1042803#M60612</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I have a problem regarding a small python script for creating a toolbox in ArcGIS Pro. My aim is to create 3D Boreholes in a Scene Layer. For this purpose I first wanted the possibility for the user to enter values regarding the hight in a point feature class.&lt;/P&gt;&lt;P&gt;Until now I created the fields for the values. But now I cant find any solutions for creating the values for each line in the feature class. Should be possible for the user to enter them for each feature in the class...&lt;/P&gt;&lt;P&gt;If anyone knows a possiblity for doing something like this I would be very thankful for some input (where I can look for possible soultions or functions ect.).&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;arcpy&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;arcpy.env.overwriteOutput = &lt;SPAN&gt;False&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;# Get Value from Raster&lt;BR /&gt;&lt;/SPAN&gt;wells = arcpy.GetParameterAsText(&lt;SPAN&gt;0&lt;/SPAN&gt;)&lt;BR /&gt;raster = arcpy.GetParameterAsText(&lt;SPAN&gt;1&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Extract Values to Points (Extract Values to Points) (sa)&lt;BR /&gt;&lt;/SPAN&gt;Output_point_features = arcpy.GetParameterAsText(&lt;SPAN&gt;2&lt;/SPAN&gt;)&lt;BR /&gt;arcpy.sa.ExtractValuesToPoints(in_point_features=wells&lt;SPAN&gt;, &lt;/SPAN&gt;in_raster=raster&lt;SPAN&gt;, &lt;/SPAN&gt;out_point_features=Output_point_features&lt;SPAN&gt;, &lt;/SPAN&gt;interpolate_values=&lt;SPAN&gt;"NONE"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;add_attributes=&lt;SPAN&gt;"VALUE_ONLY"&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#AddField FromDepth ToDepth&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;fieldName1 = &lt;SPAN&gt;"FromDepth"&lt;BR /&gt;&lt;/SPAN&gt;fieldPrecision = &lt;SPAN&gt;3&lt;BR /&gt;&lt;/SPAN&gt;fieldAlias = &lt;SPAN&gt;"fromdepth"&lt;BR /&gt;&lt;/SPAN&gt;fieldName2 = &lt;SPAN&gt;"ToDepth"&lt;BR /&gt;&lt;/SPAN&gt;fieldPrecision2 = &lt;SPAN&gt;3&lt;BR /&gt;&lt;/SPAN&gt;fieldAlias2 = &lt;SPAN&gt;"todepth"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;arcpy.AddField_management(Output_point_features&lt;SPAN&gt;,&lt;/SPAN&gt;fieldName1&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"LONG" &lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;fieldPrecision&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                          field_alias=fieldAlias&lt;SPAN&gt;, &lt;/SPAN&gt;field_is_nullable=&lt;SPAN&gt;"NULLABLE"&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;arcpy.AddField_management(Output_point_features&lt;SPAN&gt;,&lt;/SPAN&gt;fieldName2&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"LONG" &lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;fieldPrecision2&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                          field_alias=fieldAlias2&lt;SPAN&gt;, &lt;/SPAN&gt;field_is_nullable=&lt;SPAN&gt;"NULLABLE"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;Thanks in advance and regards,&lt;/P&gt;&lt;P&gt;Nicola&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 10:07:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-feature-field-in-feature-class-with/m-p/1042803#M60612</guid>
      <dc:creator>Nicola</dc:creator>
      <dc:date>2021-04-01T10:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create Feature Field in Feature Class with possibility to add values Toolbox</title>
      <link>https://community.esri.com/t5/python-questions/create-feature-field-in-feature-class-with/m-p/1042837#M60613</link>
      <description>&lt;P&gt;the parameters just need to be set properly in the parameter, For both, you would have to specify as a Text (string) parameter.&amp;nbsp; The downside, your people would have to enter the full path to the 'wells' and 'raster' and make sure it is 'raw' encoded .&lt;/P&gt;&lt;P&gt;A better method would be to let them navigate to the FeatureClass and to the raster on disk.&lt;/P&gt;&lt;P&gt;Entering other values as parameters like 'from depth' and 'to depth' you would specify 'float' or 'double' or even 'integer' as the data type.&amp;nbsp; The users can then specify the depths manually.&amp;nbsp; You then have to provide checks to ensure the correct data type and you would use the GetParameter option&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/getparameter.htm" target="_blank"&gt;GetParameter—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;or convert to the appropriate data type if you are using GetParameterAsText&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 12:42:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-feature-field-in-feature-class-with/m-p/1042837#M60613</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-04-01T12:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create Feature Field in Feature Class with possibility to add values Toolbox</title>
      <link>https://community.esri.com/t5/python-questions/create-feature-field-in-feature-class-with/m-p/1044095#M60689</link>
      <description>&lt;P&gt;Thanks a lot for your help!&lt;/P&gt;&lt;P&gt;I now used the method with letting them navigate to FeatureClass and raster!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 11:10:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-feature-field-in-feature-class-with/m-p/1044095#M60689</guid>
      <dc:creator>Nicola</dc:creator>
      <dc:date>2021-05-05T11:10:34Z</dc:date>
    </item>
  </channel>
</rss>

