<?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 Split Feature in Topographic Production Toolbox in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/split-feature-in-topographic-production-toolbox/m-p/1052504#M40364</link>
    <description>&lt;P&gt;I'm trying to split about 20 polygon features in a file gdb with another multipart polygon, but don't have the Topographic Production license. I've modified the Example 2 python script here (&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/topographic-production/split-features.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/topographic-production/split-features.htm&lt;/A&gt;) but I think it's failing because I don't have the license. Is there a way to do this without that extension? I've also read that checking the license out or in is only necessary if you're a concurrent user, but I'm a named user.&lt;/P&gt;&lt;P&gt;I'm a Python beginner using ArcPro 2.6.2&lt;/P&gt;&lt;P&gt;Any help is much appreciated! Thanks!&lt;/P&gt;&lt;P&gt;Here's my modified code:&lt;/P&gt;&lt;P&gt;# Name: SplitFeatures_sample2.py&lt;BR /&gt;# Description: Gets all feature classes in a geodatabase and splits them on the selected cutting feature&lt;/P&gt;&lt;P&gt;# Import System Modules&lt;BR /&gt;import arcpy&lt;BR /&gt;import os&lt;/P&gt;&lt;P&gt;# Check Out Extensions&lt;BR /&gt;arcpy.CheckOutExtension('Foundation')&lt;/P&gt;&lt;P&gt;# Setting Local Variables&lt;BR /&gt;cutting_features = r'C:\Users\kate.rose\GIS\GOM_CMECS\CMECS_GC_XWALK.gdb\CMECS_AS_MEOW_GMX'&lt;BR /&gt;target_database = r'C:\Users\kate.rose\GIS\GOM_CMECS\CMECS_Feature_split.gdb'&lt;/P&gt;&lt;P&gt;# Getting feature classes from the target geodatabase that are managed in a feature dataset&lt;BR /&gt;target_features = r''&lt;BR /&gt;arcpy.env.workspace = target_database&lt;BR /&gt;datasets = arcpy.ListDatasets('*', 'Feature')&lt;BR /&gt;for dataset in datasets:&lt;BR /&gt;fclasses = arcpy.ListFeatureClasses('*', '', dataset)&lt;BR /&gt;for fclass in fclasses:&lt;BR /&gt;desc = arcpy.Describe(fclass)&lt;BR /&gt;if desc.shapeType in ('Polygon', 'Polyline'):&lt;BR /&gt;target_features += os.path.join(target_database, dataset, fclass) + ';'&lt;BR /&gt;target_features = target_features[:-1]&lt;/P&gt;&lt;P&gt;# Setting selection on cutting features&lt;BR /&gt;selected_feature = arcpy.management.MakeFeatureLayer(cutting_features, 'AOI').getOutput(0)&lt;BR /&gt;arcpy.management.SelectLayerByAttribute(selected_feature, 'NEW_SELECTION', "PRODUCT_ID = 'V795X16573'")&lt;/P&gt;&lt;P&gt;# Splitting all features in a database based on the selected cutting feature&lt;BR /&gt;arcpy.topographic.SplitFeatures(selected_feature, target_features, 'DONT_USE_TARGET_Z')&lt;/P&gt;&lt;P&gt;# Check In Extensions&lt;BR /&gt;arcpy.CheckInExtension('Foundation')&lt;/P&gt;</description>
    <pubDate>Wed, 28 Apr 2021 21:33:09 GMT</pubDate>
    <dc:creator>KateRose</dc:creator>
    <dc:date>2021-04-28T21:33:09Z</dc:date>
    <item>
      <title>Split Feature in Topographic Production Toolbox</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/split-feature-in-topographic-production-toolbox/m-p/1052504#M40364</link>
      <description>&lt;P&gt;I'm trying to split about 20 polygon features in a file gdb with another multipart polygon, but don't have the Topographic Production license. I've modified the Example 2 python script here (&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/topographic-production/split-features.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/topographic-production/split-features.htm&lt;/A&gt;) but I think it's failing because I don't have the license. Is there a way to do this without that extension? I've also read that checking the license out or in is only necessary if you're a concurrent user, but I'm a named user.&lt;/P&gt;&lt;P&gt;I'm a Python beginner using ArcPro 2.6.2&lt;/P&gt;&lt;P&gt;Any help is much appreciated! Thanks!&lt;/P&gt;&lt;P&gt;Here's my modified code:&lt;/P&gt;&lt;P&gt;# Name: SplitFeatures_sample2.py&lt;BR /&gt;# Description: Gets all feature classes in a geodatabase and splits them on the selected cutting feature&lt;/P&gt;&lt;P&gt;# Import System Modules&lt;BR /&gt;import arcpy&lt;BR /&gt;import os&lt;/P&gt;&lt;P&gt;# Check Out Extensions&lt;BR /&gt;arcpy.CheckOutExtension('Foundation')&lt;/P&gt;&lt;P&gt;# Setting Local Variables&lt;BR /&gt;cutting_features = r'C:\Users\kate.rose\GIS\GOM_CMECS\CMECS_GC_XWALK.gdb\CMECS_AS_MEOW_GMX'&lt;BR /&gt;target_database = r'C:\Users\kate.rose\GIS\GOM_CMECS\CMECS_Feature_split.gdb'&lt;/P&gt;&lt;P&gt;# Getting feature classes from the target geodatabase that are managed in a feature dataset&lt;BR /&gt;target_features = r''&lt;BR /&gt;arcpy.env.workspace = target_database&lt;BR /&gt;datasets = arcpy.ListDatasets('*', 'Feature')&lt;BR /&gt;for dataset in datasets:&lt;BR /&gt;fclasses = arcpy.ListFeatureClasses('*', '', dataset)&lt;BR /&gt;for fclass in fclasses:&lt;BR /&gt;desc = arcpy.Describe(fclass)&lt;BR /&gt;if desc.shapeType in ('Polygon', 'Polyline'):&lt;BR /&gt;target_features += os.path.join(target_database, dataset, fclass) + ';'&lt;BR /&gt;target_features = target_features[:-1]&lt;/P&gt;&lt;P&gt;# Setting selection on cutting features&lt;BR /&gt;selected_feature = arcpy.management.MakeFeatureLayer(cutting_features, 'AOI').getOutput(0)&lt;BR /&gt;arcpy.management.SelectLayerByAttribute(selected_feature, 'NEW_SELECTION', "PRODUCT_ID = 'V795X16573'")&lt;/P&gt;&lt;P&gt;# Splitting all features in a database based on the selected cutting feature&lt;BR /&gt;arcpy.topographic.SplitFeatures(selected_feature, target_features, 'DONT_USE_TARGET_Z')&lt;/P&gt;&lt;P&gt;# Check In Extensions&lt;BR /&gt;arcpy.CheckInExtension('Foundation')&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 21:33:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/split-feature-in-topographic-production-toolbox/m-p/1052504#M40364</guid>
      <dc:creator>KateRose</dc:creator>
      <dc:date>2021-04-28T21:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: Split Feature in Topographic Production Toolbox</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/split-feature-in-topographic-production-toolbox/m-p/1052514#M40365</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/160398"&gt;@KateRose&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-blog/code-formatting-the-community-version/ba-p/1007633" target="_blank" rel="noopener"&gt;Code formatting ... the Community Version - Esri Community&lt;/A&gt;&amp;nbsp;makes it easier to read the code.&lt;/P&gt;&lt;P&gt;Also, what is the error message?&lt;/P&gt;&lt;P&gt;If you don't have the extension, it should have said so. especially since you used the same line in the selectbyattributes without modification.&amp;nbsp; It works with a selected feature as the cutter&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/topographic-production/split-features.htm" target="_blank" rel="noopener"&gt;Split Features (Topographic Production)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Alternatives, if you can get the cutter polygons formatted properly&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/analysis/split.htm" target="_blank"&gt;Split (Analysis)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 21:58:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/split-feature-in-topographic-production-toolbox/m-p/1052514#M40365</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-04-28T21:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Split Feature in Topographic Production Toolbox</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/split-feature-in-topographic-production-toolbox/m-p/1052567#M40372</link>
      <description>&lt;P&gt;Thanks for the links- I'm now subscribed!&lt;/P&gt;&lt;P&gt;The code again:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Name: SplitFeatures_sample2.py
# Description: Gets all feature classes in a geodatabase and splits them on the selected cutting feature

# Import System Modules
import arcpy
import os

# Check Out Extensions
arcpy.CheckOutExtension('Foundation')

# Setting Local Variables
cutting_features = r'C:\Users\kate.rose\GIS\GOM_CMECS\CMECS_GC_XWALK.gdb\CMECS_AS_MEOW_GMX'
target_database = r'C:\Users\kate.rose\GIS\GOM_CMECS\CMECS_Feature_split.gdb'

# Getting feature classes from the target geodatabase that are managed in a feature dataset
target_features = r''
arcpy.env.workspace = target_database
datasets = arcpy.ListDatasets('*', 'Feature')
for dataset in datasets:
    fclasses = arcpy.ListFeatureClasses('*', '', dataset)
    for fclass in fclasses:
        desc = arcpy.Describe(fclass)
        if desc.shapeType in ('Polygon', 'Polyline'):
            target_features += os.path.join(target_database, dataset, fclass) + ';'
target_features = target_features[:-1]

# Setting selection on cutting features
selected_feature = arcpy.management.MakeFeatureLayer(cutting_features, 'AOI').getOutput(0)
arcpy.management.SelectLayerByAttribute(selected_feature, 'NEW_SELECTION', "PRODUCT_ID = 'V795X16573'")

# Splitting all features in a database based on the selected cutting feature
arcpy.topographic.SplitFeatures(selected_feature, target_features, 'DONT_USE_TARGET_Z')

# Check In Extensions
arcpy.CheckInExtension('Foundation')&lt;/LI-CODE&gt;&lt;P&gt;And the error message:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ExecuteError                              Traceback (most recent call last)
In  [3]:
Line 29:    arcpy.management.SelectLayerByAttribute(selected_feature, 'NEW_SELECTION', "PRODUCT_ID = 'V795X16573'")

File c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py, in SelectLayerByAttribute:
Line 8754:  raise e

File c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py, in SelectLayerByAttribute:
Line 8751:  retval = convertArcObjectToPythonObject(gp.SelectLayerByAttribute_management(*gp_fixargs((in_layer_or_view, selection_type, where_clause, invert_where_clause), True)))

File c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py, in &amp;lt;lambda&amp;gt;:
Line 511:   return lambda *args: val(*gp_fixargs(args, True))

ExecuteError: ERROR 000358: Invalid expression
Failed to execute (SelectLayerByAttribute).&lt;/LI-CODE&gt;&lt;P&gt;The 'AOI' was created, but I have no idea what the SelectLayerByAttribute is supposed to do. I tried Google and the search on this site but couldn't come up with anything that I could understand.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did see the Split (Analysis) option but don't want to end up with individual polygons...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 02:06:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/split-feature-in-topographic-production-toolbox/m-p/1052567#M40372</guid>
      <dc:creator>KateRose</dc:creator>
      <dc:date>2021-04-29T02:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Split Feature in Topographic Production Toolbox</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/split-feature-in-topographic-production-toolbox/m-p/1052568#M40373</link>
      <description>&lt;P&gt;skip google... the help files are very good&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/select-layer-by-attribute.htm" target="_blank"&gt;Select Layer By Attribute (Data Management)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Well your featureclass is supposed to have a field in it and you would be querying for this&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"PRODUCT_ID = 'V795X16573'"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;So, that appears to be the exact lines from the example in the Split tool, so I am not sure that you have that field or its value.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code was an example... in a perfect replica of the parameters and the data that went into the example it would work.&amp;nbsp; If you are emulating the code with your own data, you have to get stuff correct.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 02:16:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/split-feature-in-topographic-production-toolbox/m-p/1052568#M40373</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-04-29T02:16:08Z</dc:date>
    </item>
  </channel>
</rss>

