POST
|
Yes, I know about exclusive/shared locks since I work with them using ArcObjects. In ArcGIS Pro 2.0 I see that Add Field doesn't delete locks were set by this tool for shapefiles. Do you confirm this issue?
... View more
07-23-2017
01:05 AM
|
0
|
0
|
2140
|
POST
|
Hi Sean, My workflow was: create feature class via executing appropriate geoprocessing tool; get path to created feature class as result of previous step; get Item by this path (through ItemFactory) and add feature layer by this item to a map; add fields to the created feature class via executing appropriate geoprocessing tool; execute EditOperation via callback which populates the feature class with some features. In 1.4 this stuff works fine, in 2.0 not. Edit operation was failed with the "Edit operation failed. The data is currently locked by another user and cannot be saved" message. I even didn't fall to the callback's body. But I fixed this with moving step 3 (adding of feature layer to a map) to the end of instructions list above. I decided to make a clean test creating test add-in and reproduce this workflow, and got no errors... So it is kind of mystic. But as I said in my previous post "Add Field with shapefile as an input table produces lock files near shp". I mean executing the tool from ArcGIS Pro, not programmatically. Unfortunately I didn't see any reaction of the ESRI staff to this behavior. For me it seems like a bug.
... View more
07-20-2017
07:54 PM
|
0
|
1
|
2140
|
POST
|
Hi Narelle, I confirm, in 2.0 the bug is fixed. Thank you.
... View more
07-18-2017
11:22 PM
|
2
|
0
|
2203
|
POST
|
I've updated my question. I'm taking a feature class from Geodatabase returned by GDBProjectItem.GetDatastore. So this feature class is not added to map and I can't see it on List by Editing tab.
... View more
07-05-2017
10:45 PM
|
0
|
1
|
1152
|
POST
|
Hmm.. As I said in my previous post Add Field with shapefile as an input table produces lock files near shp. These lock files will be removed only when I close ArcGIS Pro. Is it OK? I suppose tools that change schema must delete locks were set by them. I see this behavior in 2.0.
... View more
07-05-2017
07:56 PM
|
0
|
2
|
2140
|
POST
|
Luke Coursey I have the same problem. Did you find a solution? I made simple test: I executed Add Field tool on shapefile and found 3 (!!!) locks near shp file after tool has finished. Seems like a bug on the ESRI side. I sure that Add Field shouldn't lock dataset. Sean Jones Did you reproduce the issue?
... View more
07-04-2017
02:42 AM
|
0
|
8
|
3678
|
POST
|
I have following code: var operation = new EditOperation
{
Name = "Test edit operation",
ShowModalMessageAfterFailure = false,
EditOperationType = EditOperationType.Long,
CancelMessage = null,
ProgressMessage = null,
ShowProgressor = false
};
operation.Callback(context =>
{
// I never get here if fc is a feature class from SDE database
},
fc);
operation.Execute(); If fc is a feature class from SDE database I never fall to callback's body. If feature class is from FGDB all is OK. What am I doing wrong? I'm taking a feature class from Geodatabase returned by GDBProjectItem.GetDatastore.
... View more
07-04-2017
12:31 AM
|
0
|
3
|
1496
|
POST
|
With ArcGIS Pro SDK 1.4 I could do this: new Geodatabase(geodatabasePath) where geodatabasePath can be path of FGDB or SDE file. I know that now there are constructor overloads for FGDB and SDE. But the problem is that I don't know which database type will be presented by geodatabasePath. How can I create an instance of the Geodatabase by path that can be either path of FGDB or SDE file? Or maybe there is some method that can say what geodatabase type presented by a path?
... View more
07-03-2017
12:35 AM
|
0
|
1
|
1995
|
POST
|
Hi Thomas, Thanks for reply. Yes, checking the sign of a polygon's area is a way to determine orientation of a ring. In my first post I mentioned this way. The way you've suggested is more efficient in terms of performance than checking of Area property. But I really don't understand why you are not going to turn this snippet into some method like GeometryUtils.GetOrientation. Also suggested code is more verbose than checking of the Area property value so I am surprised even more that you force developers to use this snippet for such common task as checking of a ring's orienation.
... View more
03-07-2017
04:36 AM
|
0
|
0
|
1905
|
POST
|
I have a couple of questions regarding to working with parts of polygons. How can I know if a part is a hole? At now there is no easy way to determine if a polygon's part is a hole. Turning the part into polygon and checking the sign of its area is the only way. If value of the Area property is a positive number we deal with exterior ring, if negative – with a hole. But it's not obvious. It would be great if there will be some method to check orientation of a part in the Pro SDK. Since a part of a polygon is just ReadOnlySegmentCollection (which is common for polylines and polygons) maybe the more appropriate place for such method is GeometryEngine. How can I get all holes of the specific exterior ring? At now the only way to get all holes of the exetrior part is var partsAsPolygons = polygon.Parts.Select(p => PolygonBuilder.CreatePolygon(p));
foreach (var exteriorPart in partsAsPolygons.Where(p => p.Area > 0))
{
var interiorParts = partsAsPolygons.Where(p => p.Area < 0 && GeometryEngine.Contains(exteriorPart, p));
} So we need to use GeometryEngine.Contains method to find all parts with negative area inside some part with positive area. Awful workaround. Hope you will add easy way to get interior parts of an exterior one.
... View more
03-04-2017
07:02 PM
|
0
|
2
|
2623
|
POST
|
nchedzey-esristaff, can you confirm that the bug exists?
... View more
02-19-2017
07:28 PM
|
0
|
2
|
2203
|
POST
|
Thomas, You are right, I tested my code and it really raises the error you described. I noticed that if I specify symbology_fields like "\"VALUE_FIELD\" \"gridcode\" \"gridcode\"" then tool is succesfully completed at the second time. I didn't check if result is correct but tool completes without errors. This tool is kind of mystic in case of using it from code. Someone from ArcGIS Pro SDK team definitely should clarify how to use Apply Symbology From Layer tool from the .NET code. It's obviously in their interest to describe different aspects of working with their product. And it's really strange to me that no one from the Pro SDK team didn't leave any comment in this thread...
... View more
02-16-2017
08:55 PM
|
1
|
0
|
3047
|
POST
|
Bug is not functionality error only. Design issues are bugs too. I just drew ArcGIS Pro developers attention to this problem. I hope they will fix it in the next release. I think it is not such a big problem so I will not write to support. I write to support if there is a bug in ArcObjects or in ArcGIS Pro SDK, but this is just cosmetic issue that can be easy fixed in WPF (by which the ArcGIS Pro GUI is built).
... View more
02-13-2017
03:14 AM
|
0
|
1
|
644
|
POST
|
Hi Thomas, Help for Apply Symbology From Layer gives clear example of how you need to specify symbology_fields parameter: [["VALUE_FIELD", "#", "MyValueField"],["NORMALIZATION_FIELD", "#", "MyNormalizationField"]] Each field descriptor (Field type, Source field, Match field) must be surrounded by square brackets. List of fields descriptors must be surrounded by square brackets too. So the correct code for your task is: var inLayer = rasterLayer.Name;
var inSymbologyLayer = strPathToLyrFile;
var symbologyFields = "[[\"VALUE_FIELD\", \"gridcode\", \"gridcode\"]]";
var parameters = Geoprocessing.MakeValueArray(inLayer,
inSymbologyLayer,
symbologyFields);
var gpResult = await Geoprocessing.ExecuteToolAsync("ApplySymbologyFromLayer_management",
parameters,
null,
CancelableProgressor.None,
GPExecuteToolFlags.Default);
... View more
02-10-2017
08:51 PM
|
0
|
0
|
3047
|
Title | Kudos | Posted |
---|---|---|
1 | 09-25-2018 09:14 AM | |
1 | 11-20-2017 12:35 PM | |
1 | 02-16-2017 08:55 PM | |
1 | 11-18-2017 06:15 AM | |
1 | 01-13-2017 07:15 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|