POST
|
While performing steps 1 (edits features) and 2 (validate network) above in a version eventually an error will occur that prevents the user from saving edits. So far I have been unable to consistently reproduce the behavior. This leading me to believe that validating in a version is not a good idea. @MelissaJarman any insights?
... View more
01-10-2022
05:10 PM
|
0
|
1
|
1534
|
POST
|
There is definitely some odd behavior with the way the ArcGIS Pro coreHost behaves inside the AutoCAD. I've tried a variety methods to keep the ArcGIS SDK code in it's own thread but it hasn't worked. I'm probably going to have to design the code to write to the AutoCAD database without the UI. For now users are working around the problem to closing and restarting AutoCAD after each command that accesses the ArcGIS SDK corehost.
... View more
12-13-2021
02:48 PM
|
0
|
0
|
815
|
POST
|
I'm now seeing the same behavior using ArcGIS Pro 2.8.3 and connecting to Utility Network branched versioned services from ArcGIS enterprise 10.9.
... View more
12-13-2021
02:20 PM
|
0
|
0
|
444
|
POST
|
In ArcGIS Pro 2.8.3 when trying to update a feature using Python update cursor an error occurs (see below). This error occurs in our enterprise implementation of the Water Utility Network Solution and also when using the sample Naperville data provided in a file geodatabase. Editing workflows in the ArcGIS Pro UI work fine for this type of edit. These attribute rules were provided as part of the Water Utility Network Solution. If I disable the attribute rule it will fail on another rule (Water Line - MeasuredLength From Shape), when both are disabled the edit occurs without error. Here is a simplified snippet of code: import arcpy
aprx = arcpy.mp.ArcGISProject("CURRENT")
m = aprx.listMaps()[0]
idFeature = []
for lyr in m.listLayers():
lyrdesc = arcpy.Describe(lyr)
if lyr.isFeatureLayer:
fi = lyrdesc.fieldInfo
obj = lyrdesc.FIDSet
if obj:
wc = "OBJECTID in ({0})".format(obj.replace(";",","))
print(wc)
with arcpy.da.UpdateCursor(lyr, ["OID@", "NOTES"],wc) as cursor:
for row in cursor:
row[1] = "TEST"
cursor.updateRow(row) RuntimeError: Failed to evaluate Arcade expression. [ Rule name: Water Line - Cathodic Protection Traceability, Triggering event: Update, Class name: WaterLine, GlobalID: , Arcade error: Field not found cptraceability, Script line: 25]
... View more
12-13-2021
01:47 PM
|
0
|
4
|
1012
|
POST
|
Are there any best practices for running validate Network Topology against a branched version Utility Network? In a version other than sde.Default I make data changes and get dirty areas. Click the Validate Network Topology Current Extent button. Dirty areas are gone. Save Reconcile and Post Switch to sde.Default The dirty area is now in sde.Default Click the Validate Network Topology Current Extent button. Dirty areas are really gone. Based on those steps there is always a need to run Validate Network Topology against sde.Default even after clearing dirty areas in another version. Is this the proper workflow?
... View more
12-09-2021
02:39 PM
|
0
|
7
|
1622
|
POST
|
Yes I am aware of those methods but I need to modify the features. Those methods don't provide the same granular access to rows. To clarify I need to set an organization id on the feature then use that ID to write to an external data repository.
... View more
11-23-2021
02:37 PM
|
0
|
0
|
453
|
POST
|
I have a need to detect when a split occurs so that I can get a new custom ID and update a database that is outside ArcGIS. This code works fine when using an Enterprise geodatabase. However when I execute a split against a utility network branch version layer the events never fire but the split operation completes successfully. Using fiddler I was able to see that the applyEdits is sending a "splits" object as opposed to "updates" or "creates". private Dictionary<string, List<SubscriptionToken>> _rowevents = new Dictionary<string, List<SubscriptionToken>>();
foreach (var fl in ActiveMapView.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>())
{
var fc = fl.GetFeatureClass();
var tokens = new List<SubscriptionToken>();
tokens.Add(RowCreatedEvent.Subscribe((rc) => RowEventHandler(rc), fc));
tokens.Add(RowChangedEvent.Subscribe((rc) => RowEventHandler(rc), fc));
tokens.Add(RowDeletedEvent.Subscribe((rc) => RowEventHandler(rc), fc));
_rowevents[fc.GetName()] = tokens;
}
private void RowEventHandler(RowChangedEventArgs rc)
{
//Never fires when a split
}
... View more
11-23-2021
09:46 AM
|
1
|
3
|
669
|
POST
|
Because FeatureSetByRelationshipName returns a FeatureSet that may have more than one row. You can't just return it you have to get a value from a row. Assuming you have a one to one relationship you can just get the First one: if (!IsEmpty(test))
{
return First(test).COMMENT_
} If you have one to many, you would have to apply more logic to decide which one you want.
... View more
10-11-2021
02:57 PM
|
0
|
0
|
543
|
POST
|
Yes the process appears to complete each time. I think you're on to something with the Dispose/Using. I put the versionmanager into a using block and that helps. There's still some issues but I suspect there are some other objects that are not in a using or disposed of. Hopefully once I get them being disposed it will just work.
... View more
09-22-2021
05:11 PM
|
0
|
0
|
1327
|
POST
|
I tried IsSignedOn and it does not return false it actually throws the following exception: ArcGIS.Core.SystemCore.SystemCoreException: 'Error HRESULT E_FAIL has been returned from a call to a COM component.'
... View more
09-22-2021
03:17 PM
|
0
|
0
|
1329
|
POST
|
Thanks for the reply @RichRuh. Wrapping the code with QueuedWorker didn't help, same result. For now we can have users close AutoCAD between commands that need ArcGIS data, which is not ideal but at least it will get what we need into AutoCAD. It's unfortunate since it has been working really well using a direct sde connection. If I get more time in the future I will try to redesign or maybe ArcGIS for AutoCAD will get to where it can read branch versions.
... View more
09-21-2021
03:01 PM
|
0
|
0
|
1340
|
POST
|
Behavior described below was tested in ArcGIS Pro 2.6.3 and 2.8.2 and works the same in both. Using .net framework 4.8. I have this code snippet using the ArcGIS Pro SDK CoreHost that is run through AutoCAD 2021 using the netload command. This first example connects to an Enterprise Geodatabase using an sde connection to get a list of versions and works every time the command is executed. This is part of a bigger application that reads data from an SDE Version (selected by the user) and creates entities in the AutoCAD drawing. [STAThread]
//AutoCAD .net runtime command
[CommandMethod("AGTEST")]
public void Execute()
{
Host.Initialize();
var sdeconn = new DatabaseConnectionFile(new Uri("pathto.sde file"));
var gdb = new Geodatabase(sdeconn);
if (gdb.IsVersioningSupported())
{
var versionm = gdb.GetVersionManager();
var versions = versionm.GetVersionNames().OrderBy(p => p).ToList();
}
} I'm currently attempting to move to a Utility Network and updating the code to use ServiceConnectionProperties to instantiate the GeoDatabase. [STAThread]
//AutoCAD .net runtime command
[CommandMethod("AGTEST")]
public void Execute()
{
Host.Initialize();
var scp = new ServiceConnectionProperties(new Uri("https://myportal.mydomain.com/arcgis/rest/services/UN/Water_Distribution_Utility_Network/FeatureServer"));
var gdb = new Geodatabase(scp);
if (gdb.IsVersioningSupported())
{
var versionm = gdb.GetVersionManager();
var versions = versionm.GetVersionNames().OrderBy(p => p).ToList();
}
} The first time this code is ran it works as expected. Sometimes even subsequent executions work but eventually an exception will be thrown on line 12. The error reported is ArcGIS.Core.Data.GeodatabaseGeneralException HResult=0x80131500 Message=The application is not licensed to edit this type of data. Since it's service request I'm able to see what is happening with Fiddler and at some point the token stops being supplied in the requests and this is what triggers the error. I would appreciate any advice on how to make this work. Thanks, Jimmy
... View more
09-15-2021
04:59 PM
|
0
|
8
|
1413
|
POST
|
I have ArcGIS for AutoCAD 400 and I have Utility Network feature service I would like to connect to a specific version but I don't see that I can do that. Is there support for connecting to a version?
... View more
06-10-2021
08:43 AM
|
0
|
3
|
912
|
POST
|
Thanks for the clarification, I needed that help to get past a few mental road blocks. For editing seems like we will be okay unless there is some new feature we are trying. I think I have some attribute rules using some newer features, I will test these to make sure they behave as expected. As @VishApte indicated I was able to create a utility network using ArcGIS Pro 2.7.3 against Enterprise 10.8.1/Utility Network v4. The problem that I conflated with create the utility network was applying an asset package. I have an asset package that can be applied to my Enterprise 10.8.1/Utility Network v4 when I use ArcGIS Pro 2.6.3 but I'm unable to "apply" that asset package when using ArcGIS Pro 2.7.3 (error message "The Utility Network must be version 5"). Not a big issue now that I understand what's happening. I'm going to try and get my organization to upgrade to Enterprise 10.9 soon and stick with Pro 2.7 until I can get the Utility Network in place.
... View more
05-19-2021
05:17 PM
|
0
|
0
|
1847
|
POST
|
As I today these are the paths to create a Utility Network: ArcGIS Pro 2.6x with Enterprise 10.8.1 and Utility Network version 4 ArcGIS Pro 2.7x with Enterprise 10.9 and Utility Network version 5 ArcGIS Pro 2.8 No? I have been running ArcGIS Pro 2.7 for a few months but 10.9 has only recently become available. In order to create a Utility Network I would either need to install 2.6 or upgrade Enterprise to 10.9, correct? My organization is working on migrating the Utility Network and plan to fully implement in the fall. We suspect that we will be able to upgrade to 10.9 by that time. However some users have already upgraded to ArcGIS Pro 2.8, will they be able to edit and work with the Utility Network created by earlier versions? Thank you for any input about how to work with Utility Network and the various versions of software needed for it to work as expected.
... View more
05-17-2021
02:13 PM
|
0
|
4
|
1887
|
Title | Kudos | Posted |
---|---|---|
1 | 03-02-2022 01:03 PM | |
1 | 02-07-2023 05:16 PM | |
1 | 05-09-2022 12:30 PM | |
3 | 10-04-2022 11:55 AM | |
1 | 09-15-2022 05:04 PM |
Online Status |
Offline
|
Date Last Visited |
yesterday
|