POST
|
In my utility network there are what I can only describe as orphaned associations. ArcGIS Pro (2.9 and 3.0) shows them in the dirty areas table but doesn't show them in the Modify Associations pane. I'd like to just delete them but I'm not seeing how to do that. When I query the rest endpoint there are results returned. When I try to delete them from the rest endpoint I get an error. Any ideas on how to clear these?
... View more
07-19-2022
07:06 AM
|
0
|
1
|
534
|
IDEA
|
Replying for Glen since we are working on this together. For context we are using a modified version of the Water Distribution Solution. The system and pressure subnetworks have a condition barrier "Lifecycle Status Does not include any (bitwise AND equals False) Specific value In Service and To Be Retired". In the image below the cyan are approved features and the blue are in service. When we go to build the subnetwork the approved valve, cap, and coupling act as barriers (as expected based on the condition). Everything to the right will not be included in the subnetwork.
... View more
06-16-2022
05:03 PM
|
0
|
0
|
1970
|
POST
|
Using this sample the asset group and asset type are returning the coded value and not the description. Is this the expected behavior? I can't think of a scenario where I would want only the coded value in the popup. Is it my responsibility as a user of the javascript api to decode the values? I have applied this code with my own Utility Network service and behaves in the same way. Intro to SubtypeGroupLayer | Sample Code | ArcGIS API for JavaScript 4.23 | ArcGIS Developer
... View more
05-26-2022
01:50 PM
|
4
|
4
|
966
|
IDEA
|
When I have group layers in a map there are times when I want to toggle selectability for many layers. When I do a shift+ it only highlights the "group" not the sub layers so I can't quickly toggle them on/off as shown in the image. It should highlight the subgroups. Currently I have to shift+ in each group. With the Utility Network using subtype group layers there could be 6+ group layers that each group has to be toggled in sub groups.
... View more
05-24-2022
09:52 AM
|
4
|
0
|
309
|
POST
|
I have a Constraint Attribute Rule that was working with ArcGIS Pro 2.9.2 and ArcGIS enterprise 10.9. After upgrading to 10.9.1 the attribute fails attempting to save edits when editing a through a feature service. The attribute rule is applied to an un-versioned enterprise database table. It seems that it will pass the client validation but fails on the server because the getUser.groups is empty. The attribute uses the GetUser as modeled in the video getUser. var p = Portal('https://xxxx.localdomain.com/portal')
var user = getUser(p);
var groups = user.groups;
if (Find("Survey",groups) > 0) {
return true;
}
return false; Does this seem like expected behavior?
... View more
05-09-2022
05:00 PM
|
0
|
1
|
667
|
POST
|
@HusseinNasser2 Does this still work on ArcGIS Enterprise 10.9.1? We just upgraded and this attribute rule is no longer working. The documentation indicates that Portal is not supported in the attribute rule profile. The other GetUser signature requires a FeatureSet. Can we get from a $feature in an attribute rule to a FeatureSet? It looks like we should be able to using GetFeatureSet.
... View more
05-09-2022
12:30 PM
|
1
|
1
|
2623
|
POST
|
In case someone stumbles on this post and needs a bit more here's an extension method to return the values of an Integer based coded value domain from a geodatabase as a dictionary. public static Dictionary<int, string> GetDomainValuesInt(this Geodatabase geodatabase, string name)
{
Dictionary<int, string> retval = new Dictionary<int, string>();
IReadOnlyList<Domain> domains = geodatabase.GetDomains();
Domain namedomain = domains.FirstOrDefault(a => a.GetName().Equals(name, StringComparison.CurrentCultureIgnoreCase));
if (namedomain != null && namedomain is CodedValueDomain)
{
//need to cast the domain to CodedValueDomain to get the Value Pairs
CodedValueDomain cvd = namedomain as CodedValueDomain;
SortedList<object, string> valuePairs = cvd.GetCodedValuePairs();
foreach (var item in valuePairs)
{
if (int.TryParse(item.Key.ToString(), out int i))
{
retval.Add(i, item.Value);
}
}
}
return retval;
}
... View more
04-19-2022
01:15 PM
|
2
|
0
|
1988
|
POST
|
Wow I'm feeling very dense at the moment. I thought I looked on the geodatabase object, I guess I just missed it. Thanks for the prompt response @RichRuh
... View more
04-14-2022
08:30 AM
|
1
|
0
|
2024
|
POST
|
I'm looking for a way to get a coded domain list based on it's name so that I can use on as combo box items in a custom dockpane or control. Am I missing the easy way to do this? There doesn't seem to be a way to do this from a workspace. There is a sample that shows how to query them directly from gdb_items in the database. I've also been able to access them through a feature but that isn't a very direct method. I'm currently hard coding the values and descriptions as shown in the image. I would rather not do that for obvious reasons.
... View more
04-13-2022
04:08 PM
|
0
|
6
|
2088
|
POST
|
Here is a "Workflow example" Validate a network topology—ArcGIS Pro | Documentation. Certainly not obvious and far from ideal.
... View more
03-31-2022
11:37 AM
|
0
|
0
|
572
|
IDEA
|
I would like to be able to connect to a service with branch versioning enabled. Then get a list of available versions and set that version so that all subsequent operations are completed use data from that version. Specifically I would need read access as there is no current requirement for edit access.
... View more
03-02-2022
01:03 PM
|
1
|
3
|
695
|
IDEA
|
When editing branch versions users occasionally encounter version locks by other users. There doesn't seem to be a way for non-administrator users to view the locks since they are only accessing the service. If this is already available please let me know the steps. Currently a user has to report version locks to the administrator who then connects to the geodatabase to see who is locking a specific version. Then the administrator has to coordinate with the other user to see if they can release the lock. It would be better if the two non-admin users can see the locks and communicate with each coordinate getting the lock released.
... View more
01-26-2022
10:58 AM
|
3
|
0
|
341
|
POST
|
In case someone (future me perhaps) comes across this post I'm posting my latest code. //Used the snippet to get utility network
var un = GetUtilityNetwork();
foreach (var item in ss)
{
var featureLayer = item.Key as BasicFeatureLayer;
if (featureLayer.Name.Contains("ASSEMBLY"))
{
EditOperation editOp = new EditOperation();
var qf = new QueryFilter() { ObjectIDs = item.Value };
RowCursor sr = featureLayer.Search(qf);
while (sr.MoveNext())
{
Row tempfeat = sr.Current;
try
{
var ele = un.CreateElement(tempfeat);
var assocs = un.GetAssociations(ele);
foreach (var a in assocs)
{
AssociationDescription associationToDelete = new AssociationDescription(a.Type, new RowHandle(a.FromElement, un), new RowHandle(a.ToElement, un));
editOp.Delete(associationToDelete);
}
editOp.Delete(tempfeat);
}
catch (Exception ex)
{
//log.Error(ex, $"Oid {tempfeat.GetObjectID()}");
}
}
var t = editOp.Execute();
var editOpChain = editOp.CreateChainedOperation();
if (t)
{
editOpChain.Delete(ss);
t = editOpChain.Execute();
}
}
}
... View more
01-20-2022
05:36 PM
|
0
|
0
|
2147
|
POST
|
Good information Rich. For additional context we have decided that the assemblies we originally created in the migration process are not providing value and are making editing more difficult. The code I'm working on will allow us to "clean up" these assemblies we no longer want and do some other house keeping that I didn't include in my pseudo code.
... View more
01-20-2022
05:33 PM
|
1
|
0
|
2147
|
POST
|
Thanks for the quick response @RichRuh, you got me over that hump. I would not have thought to use CreateElement, I was looking for something like GetElement. But I'm still missing something on how to delete the associations. When I use UtilityNetwork.DeleteAssociation I get an exception (The current operation requires an edit operation). I also see that EditOperation.Delete has an overload for an AssociationDescription but I don't see to instantiate that object from an Association or Element. //Used the snippet to get utility network
var un = GetUtilityNetwork();
foreach (var item in ss)
{
var featureLayer = item.Key as BasicFeatureLayer;
if (featureLayer.Name.Contains("ASSEMBLY"))
{
EditOperation editOp = new EditOperation();
var qf = new QueryFilter() { ObjectIDs = item.Value };
RowCursor sr = featureLayer.Search(qf);
while (sr.MoveNext())
{
Row tempfeat = sr.Current;
try
{
var ele = un.CreateElement(tempfeat);
var assocs = un.GetAssociations(ele);
foreach (var a in assocs)
{
un.DeleteAssociation(a);
/*
ArcGIS.Core.Data.GeodatabaseGeneralException: The current operation requires an edit operation.
---> System.Runtime.InteropServices.COMException: TabletPC inking error code. Initialization failure (Exception from HRESULT: 0x80040223)
at ArcGIS.Core.Internal.IUtilityNetworkIOP.UtilityNetwork_DeleteContainmentAssociation(IntPtr utilityNetworkHandle, Int32 containerSourceID, Guid containerGlobalID, Int32 contentSourceID, String[] contentGlobalIDs)
at ArcGIS.Core.Data.UtilityNetwork.UtilityNetwork.DeleteAssociation(Association association)
--- End of inner exception stack trace ---
at ArcGIS.Core.Data.UtilityNetwork.UtilityNetwork.DeleteAssociation(Association association)
at MyTools.Button1.<OnClick>b__1_0()
*/
}
editOp.Delete(tempfeat);
}
catch (Exception ex)
{
//log.Error(ex, $"Oid {tempfeat.GetObjectID()}");
}
}
var t = editOp.Execute();
}
}
... View more
01-20-2022
03:23 PM
|
0
|
0
|
2169
|
Title | Kudos | Posted |
---|---|---|
1 | 09-17-2024 10:47 AM | |
2 | 02-08-2024 09:04 AM | |
1 | 03-02-2022 01:03 PM | |
1 | 02-07-2023 05:16 PM | |
1 | 05-09-2022 12:30 PM |
Online Status |
Offline
|
Date Last Visited |
a week ago
|