POST
|
I am working with a Features Service in ArcGIS Pro. This Feature service is reached through our proxy which does the authentication. The geodatabase behind the Feature Service is used by our current system which uses the old replication mode. So I don't think I cant disable editor tracking on the tables themselves. My proble is, whenever I make changes to a field using my features service code, both the CreatedBy and ModifiedBy show up as Esri_Anonymous. I have tried to explicitly set these to the USERNAME, but it always goes back to Esri_Anonymous. //This will set the username, but will always revert to Esri_Anonymous
Inspector["UpdatedBy"] = "UserNAME"; How do I go about setting the UpdatedBy and CreatedBy fields for my Feature Service in my ArcGIS Pro SDK code?
... View more
02-07-2018
01:54 PM
|
0
|
0
|
389
|
POST
|
When I delete a feature in my map, I have a list of child features that also need to be deleted. When the parent is deleted, the child features of a different type also need to be deleted. So I trigger this code to get this done. When a delete is triggered, i successfully get the list of Rows, then a call delete and I get this error on the .Execute() line "Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt” //Delete all of the lists created above
foreach (List<Row> individualRowList in ListsOfLists)
{
if (!individualRowList.IsNullOrEmpty())
{
EditOperation deleteOperation = new EditOperation()
{
Name = string.Format("Deleted {0}", individualRowList),
SelectModifiedFeatures = false,
SelectNewFeatures = false
};
deleteOperation.Delete(individualRowList);
deleteOperation.Execute();
}
}
... View more
01-26-2018
09:39 AM
|
0
|
1
|
347
|
POST
|
I have thought about the network, but I am in the same room as the ArcGis Server and DB. That minute to create the version file is killing me. I use the embedded option and I don’t think there is anything else I can do on the client side. I was wondering if there is a server or database configuration I am missing. Dies anyone one else have to do this offline replication and download. What speeds should I expect?
... View more
01-05-2018
05:04 AM
|
0
|
1
|
1458
|
POST
|
So I think your steps have improved my speed somewhat. But i am still experiencing times of around 3 minutes to create a replica on the server and then create the version from that. Is there anything else I can do to speed this up. In my arcobjects code is simply use the Create Replica method that returns the IGDSData that I am able to quickly import once it is returned. The problem being the time of the server processing the command. By looking at the tables GDB_ITEMS and SDE_versions after I call CreateReplica, I see that the replica is created in about 20-30 seconds, but the version in SDE_versions seems to take about 1.5-2 minutes to make. After that version is created, my code very quickly imports the data in about 10 seconds. Does this seem normal?
... View more
01-04-2018
03:42 PM
|
0
|
0
|
1458
|
POST
|
I will try this and get back to you with the results and my procedure I ran. Thank you for the immediate help.
... View more
01-04-2018
11:15 AM
|
0
|
0
|
1458
|
POST
|
I put it here because maybe another user had this issue or in the future it could help someone else? I am in the process of contacting support. Now after your comment, no one will respond. I like to put my issues on here to help further the discussion and get some fixes out there for people with the same issues. However, back to the problem, it appears to maybe having something to do with the Versions of the Replicas building up over time and not being cleaned up. I wonder if this has to do with some Replicas failing during creation, syncing, or unregistering. I have gone and cleaned these up through GeoDatabase Administration-->Versions. I also cleaned up the replicas through Manage Replicas. However, it still seems that it takes around 3 minutes to create a replica on the Server? This seems like quite a bit of time. This issue is in my Test environment now Matt
... View more
01-04-2018
10:43 AM
|
0
|
3
|
1458
|
POST
|
We have a number of users and all of them seem to be failing when trying to create a replica on our ArcGIS server. Currenly we have about 150 checkout replicas on our server. Users are able to sync their changes in time, but it seems that the majority of users are getting pushed out after 5 minutes. This happens both in code using the CreateReplica method in arcobjects and when creating a replica manually through arccatalog. These replicas are made using an attribute query. We have changed all of the server configurations we can think of, but nothing seems to work. In the past, we have had too many replicas and would remove them using the "manage replicas" option, but this doesn't seem like the solution to the underlying problem. The create replica usually would take about 2 minutes to create on the server, but now it is taking >5 minutes and causing the timeout. The timeout helped us determine there was a problem, but we cant figure out why the replication is taking so long? Please help as this is in our production environment. We are running ArcGIS Server 10.5.1 and creating Checkout FileGDBs through code/manually
... View more
01-04-2018
09:56 AM
|
0
|
9
|
1765
|
POST
|
Thank You. These intersecting polygons need to redraw themselves to be fully contained within the parent polygon and must update their area values with that new confined shape. I do this through the onRowChangeEvent. My intersecting fields know how to redraw or update themselves. So I think my best option might be to get the feature list and .store() them all. This will trigger the onRowChangeEvents for each intersecting field. In the onRowChange event, it will get the Row, and in my code I tell that Row to Confine() itself and UpdateAreas() itself. I will test this out and let everyone know my results.
... View more
12-22-2017
05:28 AM
|
0
|
0
|
351
|
POST
|
I am using the .intersects method with my polygon to find all polygons of another type that intersect my polygon. I then use that row cursor to get a list of OIDs for the polygons that intersect that original polygon. I realize I can load all the OIDs into one inspector all at once, but they need to be updated individually. My question is, because I need to update those intersecting polygons individually, do I need to loop through those OIDs and load them into their own inspector one by one in order to use the Inspector functionality? Will this be inefficient? In ArcObjects I simply worked with a list of features, but it seems like the inspectors are the way to go now. I am just wondering if loading every OID into there own inspector is the best practice.
... View more
12-20-2017
07:22 PM
|
0
|
2
|
539
|
POST
|
Thank you for all of your help. I think I have the solution now. It was a combination of my projection before and after the densify was executed. Additionally, using 1m distance was more than sufficient for my needs. I projected my item to WebMercator, then densified, then projected back to my original Spatial Reference. I need to still check that the shape was correctly preserved, but this seemed to do the trick SpatialReference previousSR = densifyPolygon.SpatialReference;
//Need to get to WebMercator in order to get the circle the same
densifyPolygon = GeometryEngine.Instance.Project(densifyPolygon, SpatialReferences.WebMercator);
densifyPolygon = GeometryEngine.Instance.DensifyByLength(densifyPolygon, 1);
densifyPolygon = GeometryEngine.Instance.Project(densifyPolygon, previousSR);
_dataInspector.Shape = densifyPolygon;
... View more
12-17-2017
10:25 AM
|
1
|
0
|
935
|
POST
|
I wanted to add my finished code to help others who might want to do this. The out of box message box didn't looks right, so I made this simple solution to stop a delete, with the help of Sean's code. public static long CurrentlyDeletingOID = 0;
protected static void onRowDeleteEvent(RowChangedEventArgs args)
{
try
{
long _deletingOID = args.Row.GetObjectID();
if (CurrentlyDeletingOID != _deletingOID)
MessageBoxResult mbr = ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show("Are you sure you want to Delete this Feature?", "Confirm Delete",
MessageBoxButton.YesNo, MessageBoxImage.Warning);
if (mbr.Equals(MessageBoxResult.Yes))
{
//PROCEED with the delete
args.CancelEdit(() => Task.FromResult(true));
//Need to set this so that the code doesn't get stuck in loop, no need to reset
CurrentlyDeletingOID = _deletingOID;
}
else
{
//CANCEL the Delete
args.CancelEdit(() => Task.FromResult(false));
}
//cancel with dialog using ESRI commands
//args.CancelEdit("Delete Event\nAre you sure", true);
}
}
catch (Exception e)
{
logError("onRowDeleteEvent", e);
}
}
... View more
12-17-2017
09:30 AM
|
1
|
0
|
1028
|
POST
|
My users use the Circle tool from the editing tool bar to draw the circle via heads up digitizing. But I need this circle to be converted from the 2 points of a circle, to a densified circle~ of points. My problem can be recreated by taking the circle created using the out of box circle edit tool, then in the onRowCreated event try to densify it. I always get the oblong circle or oval.
... View more
12-16-2017
06:16 AM
|
0
|
3
|
935
|
POST
|
These circles represent an irrigation system in an agriculture field. So around 200-400m in diameter. The projection is UTM with the meridian centered for that area where the fields are at to best preserve distance. Is there a particular projection that would be best for this that would preserve the circle during the densify procedure?
... View more
12-16-2017
05:32 AM
|
0
|
5
|
935
|
POST
|
I cannot get any of the density functions to work correctly on a true circle. I simple want to draw a circle using the Circle create feature tool, then turn that circle into many points. I want to do this, because i have found that when clipping and getting the difference of two circles, it works better if they are densified. The problem is, is that everytime I try any of the 4 densify functions in Pro SDK, the circles turn into Oblong ovals. I need them to preserve their circular shape, but have many vertices. In ArcObjects I simply did this newPolygon.Densify(.0001, .0001); But in ArcGIS Pro, i cant get anything to work quite like that? They all turn into ovals, not the true circle densifyPolygon = GeometryEngine.Instance.GeodeticDensifyByDeviation(densifyPolygon,.0001,LinearUnit.Feet,GeodeticCurveType.Geodesic);
densifyPolygon = GeometryEngine.Instance.DensifyByLength(densifyPolygon, .01);
densifyPolygon = GeometryEngine.Instance.DensifyByDeviation(densifyPolygon, .0001);
etc...
... View more
12-15-2017
12:51 PM
|
0
|
7
|
1137
|
POST
|
Where can i call this from? If I call it from the OnRowDeleteEvent, and then select yes, I get a loop right. I need to catch when the user hits the delete button, and this is the only place right?
... View more
12-15-2017
10:30 AM
|
0
|
2
|
1028
|
Title | Kudos | Posted |
---|---|---|
1 | 08-23-2018 06:49 AM | |
1 | 08-02-2023 08:28 AM | |
1 | 01-03-2020 10:54 AM | |
1 | 11-30-2017 06:41 AM | |
1 | 08-20-2018 01:10 PM |
Online Status |
Offline
|
Date Last Visited |
06-19-2024
03:28 PM
|