I am clipping layers in a map and then re- linking the layer in the map to the new data source. The clipped layer is always in a gdb, the original layer is either in a shp or feature class in a gdb.
To re-link I get the connection properties of the original layer, then create a new connectionProperties for the clipped layer. This is generally working for shp and feature classes in a gdb. However when the original feature class is in a feature dataset it never works. I have tested the same data not in a feature dataset and it works.
I haven't been able to find an example of how to do this.
The connectionProperties from the feature class when inside or outside a feature dataset appear to be identical (no feature dataset name to be seen anywhere.)
I have a further complication in that one of the gdb's has a feature dataset and related tables.
In this instance I don't care about relinking relates or joins, I just want the clipped data.
Any advice would be greatly appreciated,
Ian
Solved! Go to Solution.
Hi David, thanks for your help. It looks like this is a bug/lack of implementation. Apparently the featuredataset property is not exposed using connectionProperties - which is pretty poor. See the following discussion.
At the bottom of documentation
it seems I will have to use the Cartographic Information Model (CIM) interface to repair a data source link!
I’ll try to do it this way.
How are you changing the connection? with arcpy? can you share your code? I'm guessing this isn't ArcGIS Python API related, or is this a GDB on AGOL or datastore?
Hi David, thanks for your help. It looks like this is a bug/lack of implementation. Apparently the featuredataset property is not exposed using connectionProperties - which is pretty poor. See the following discussion.
At the bottom of documentation
it seems I will have to use the Cartographic Information Model (CIM) interface to repair a data source link!
I’ll try to do it this way.