I'm trying to delete the selected features in a map some of which are Utility Network Assemblies with Associations. When I execute my edit operation this error message is returned " The feature participates in a utility network and has existing association records that must be removed prior to deleting the feature."
Which seems simple enough, I need to delete the associations before trying to delete the assembly. Unfortunately I have no idea how to do that. I've looked at the sdk documentation and samples, I'm not seeing away to access associations starting from an oid and map member. I hope I'm missing something obvious. I would appreciate any ideas?
var ss = MapView.Active.Map.GetSelection();
EditOperation editOp = new EditOperation();
foreach (var item in ss)
{
foreach (var oiditem in item.Value)
{
//How to get/delete associations for this oid?
editOp.Delete(item.Key, oiditem);
}
}
editOp.Execute()