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 (https://pro.arcgis.com/en/pro-app/latest/tool-reference/topographic-production/split-features.htm) 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.
I'm a Python beginner using ArcPro 2.6.2
Any help is much appreciated! Thanks!
Here's my modified code:
# 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')