Select to view content in your preferred language

connectionProperties for a featureclass in a feature dataset in a gdb

929
2
Jump to solution
08-12-2021 08:24 PM
IanHamilton2
Occasional Contributor

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

0 Kudos
1 Solution

Accepted Solutions
IanHamilton2
Occasional Contributor

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.

Link 

At the bottom of documentation 

Link 

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.

 

View solution in original post

0 Kudos
2 Replies
DavidPike
MVP Frequent Contributor

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?

0 Kudos
IanHamilton2
Occasional Contributor

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.

Link 

At the bottom of documentation 

Link 

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.

 

0 Kudos