POST
|
ArcGIS Pro 2.8 Oracle 12.2.0.1 Hello, We are facing a weird behaviour using the Versionning in ArcGIS Pro. We never encounter that problem in ArcMap. The Differences somehow are showing the actions from a different Version. Please, take a look at the following diagram. To be sure of the behaviour I implemented an addin tracking the differences using ArcGIS.Core.Data.DifferenceCursor and I obtain the same result. For the example, I used the same user but the problem is the same if it's a different user. My addin is tracking the changes and saving who is doing what on wich layer and I cannot historized two times the same modification by 2 differents people, especially when one did not do anything. Am I doing something wrong or is it a real bug ?
... View more
02-21-2022
12:55 AM
|
0
|
0
|
233
|
POST
|
Hi Narelle, I confirm using your code is working. It works also with Geoprocessing.MakeValueArray instead of new string[]{}. Using "management.CreateTable" is not working with your code, the error is: ErrorCode = 2147483647 ReturnValue = HasWarnings = False IsFailed = True IsCanceled = False In deed, the parameters should be all strings, the following code is working well and create the fields from the template table. var parameters = Geoprocessing.MakeValueArray( geodatabase.GetPath().AbsolutePath, tableName, System.IO.Path.Combine(templateTable.GetDatastore().GetPath().AbsolutePath, templateTable.GetName()) ); return Geoprocessing.ExecuteToolAsync( "CreateTable_management", parameters, null, _cts.Token, null, GPExecuteToolFlags.RefreshProjectItems); Is there a list somewhere for the geoprocessing tools including: id | name | description | parameters ? Thanks again for your help Narelle and Rich. Marcus
... View more
07-13-2020
02:42 AM
|
0
|
0
|
1397
|
POST
|
Hello Rich, Thanks for your reply, I tried : var args = Geoprocessing.MakeValueArray(
geodatabase.GetPath().AbsolutePath,
GetTempoLayerNameFromFClassName(tableName),
templateTable,
null
); The class Table has no GetPath method. The geoprocessing tool shoud use the "templateTable" object as a template for the new Table (create the same fields i think and maybe other things). Normally it is supported to use a Table. The method GetTempoLayerNameFromFClassName just return a string. I end up with the same error : ErrorCode = 2147483647 HasWarnings = False IsFailed = True IsCanceled = False
... View more
07-09-2020
08:38 AM
|
0
|
2
|
1397
|
POST
|
Hello, Based on this example L. 90, I'm trying to create a FeatureClass in an Oracle database using the geoprocessing tool "managment.CreateTable". In the documentation it's said that the argument "out_path" should be of type Workspace. Problem is, in this documentation, it is said that only the following classes are supported : Scalars – long, short, float, double, date, string ArcGIS.Core.Geometry.SpatialReference ArcGIS.Core.Geometry – point, line, polygon ArcGIS.Core.Geometry.Envelope – supporting GP types of GPExtentEnv, GPExtent, GPEneveope ArcGIS.Core.Data.Field – supporting GPField and list of fields for GPFieldList ArcGIS.Desktop.Mapping – Layer, StandaloneTable ArcGIS.Core.Data.Dataset – Table, FeatureClass Based on those informations I'm using the following code private static Task<IGPResult> CreateFeatureClass(Geodatabase geodatabase, string tableName, Table templateTable) { var args = Geoprocessing.MakeValueArray( geodatabase.GetConnectionString(), GetTempoLayerNameFromFClassName(tableName), templateTable, null ); System.Threading.CancellationTokenSource _cts = new System.Threading.CancellationTokenSource(); return Geoprocessing.ExecuteToolAsync("managment.CreateTable", args, null, _cts.Token, (event_name, o) => // implement delegate and handle events, o is message object. { switch (event_name) { case "OnValidate": // stop execute if any warnings if ((o as IGPMessage[]).Any(it => it.Type == GPMessageType.Warning)) _cts.Cancel(); break; case "OnProgressMessage": string msg = string.Format("{0}: {1}", new object[] { event_name, (string)o }); System.Diagnostics.Debug.WriteLine(msg); _cts.Cancel(); break; case "OnProgressPos": string msg2 = string.Format("{0}: {1} %", new object[] { event_name, (int)o }); System.Diagnostics.Debug.WriteLine(msg2); _cts.Cancel(); break; } }); } The results of the request is : ErrorCode = 2147483647 HasWarnings = False IsFailed = True IsCanceled = False There is no messages whatsoever. I have no idea how to debug that part. Do you have any clue ? Best regards, Marcus
... View more
07-09-2020
08:00 AM
|
0
|
6
|
1493
|
POST
|
Hello Sean, Thanks for putting me on the right path with the 'version differences' thing. Did not know about that Github repo ProConcepts Geodatabase · Esri/arcgis-pro-sdk Wiki · GitHub but it really helps. Will try asap, thanks again. This other thread looks also promising.
... View more
07-03-2020
08:41 AM
|
0
|
0
|
703
|
POST
|
Hello, I'm trying to achieve almost the same as you. After a "reconcile" then a "post", i want to list all changes posted to the "default" version (for all versioned layers). So far I subscribed to EditCompletedEvent and then logs what's happening. System.Diagnostics.Debug.WriteLine("Operation type = " + args.CompletedType); System.Diagnostics.Debug.WriteLine("Creates: " + args.Creates.Values.Sum(list => list.Count).ToString()); System.Diagnostics.Debug.WriteLine("Modifies: " + args.Modifies.Values.Sum(list => list.Count).ToString()); System.Diagnostics.Debug.WriteLine("Deletes: " + args.Deletes.Values.Sum(list => list.Count).ToString()); On a new version, I modify a feature located in a versioned layer. When I save CompletedType = Operation args.Modifies.Values.Sum(list => list.Count) = 1 When I reconcile CompletedType = Reconcile args.Modifies.Values.Sum(list => list.Count) = 0 When I post CompletedType = Post args.Modifies.Values.Sum(list => list.Count) = 0 I would like to know why there is nothing in Modifies when I post. It means I should save all the changes (Rows) in memory, in a dictionary for example (and in a file for persistence if the user close ArcGIS Pro) and when I detect a Post, i save the old values (the ones saved in the dictionary / file) in an other FeatureClass and let the process continues to save in the default version. Looks like what Brian did by subscribing to the RowChangedEvent of each Layer. Is it possible to detect when the Post of one element did complete ? Let's say, I made a huge modification on my version and the Post will take minutes. If I close ArcGIS Pro, ArcGIS Pro crashes or I lost the connection with the database, what will happen, a rollback, only X items will be updated ?
... View more
07-01-2020
08:50 AM
|
0
|
2
|
703
|
Online Status |
Offline
|
Date Last Visited |
02-25-2022
11:38 AM
|