|
POST
|
I've asked my colleagues who work on the Map APIs to assist. Sorry I couldn't help. --Rich
... View more
09-16-2020
09:43 AM
|
0
|
2
|
3340
|
|
POST
|
Sorry, Nadia. I work on the Pro SDK- this is well outside my area of expertise.
... View more
09-16-2020
09:24 AM
|
0
|
0
|
1431
|
|
POST
|
You can call Map.Redraw once, at the end of the process. Sorry for not stating this earlier. The Map APIs are not my area of speciality, so hopefully this will work. Also, you probably want to also walk through the StandAloneTable collection as well as Layers, but it makes sense to get the feature layer portion working first. --Rich
... View more
09-16-2020
07:23 AM
|
0
|
4
|
3340
|
|
POST
|
Thomas, Have you tried calling Map.Redraw(True) after your code above? --Rich
... View more
09-15-2020
08:47 PM
|
0
|
0
|
3340
|
|
POST
|
Thank, Sung. Let me try some experiments on my end and see what I get. --Rich
... View more
09-14-2020
05:23 PM
|
0
|
0
|
2801
|
|
POST
|
Hi Daniel, We ran a test here where we created 275,000 polylines in a file geodatabase. Using the old CreateRow method we saw it take about 10 minutes. Switching to insert cursors cut it down to 7 minutes. Not as dramatic a difference as seen with enterprise geodatabases, but still a significant improvement. We might be at the point where the best path forward is to log an issue with tech support. They can work with you to help put together a file geodatabase and code sample. Please point tech support to this thread to ensure the issue gets routed to me. Sorry I don't have any other good ideas to try. --Rich
... View more
09-14-2020
11:46 AM
|
0
|
0
|
1175
|
|
POST
|
Hi Sung, A few questions: Did this code work in the file geodatabase where you created the data? I'm a little confused by these two statements: I have copied that annotation feature class from the file geodatabase to a branch versioned SQL Server Enterprise geodatabase using arcpy.FeatureClassToFeatureClass_conversion(), and included a few custom fields (e.g. long, text) using arcpy.AddField_management(). I have published my non-versioned annotation feature class as a feature service. I think what you're saying is that the annotation feature class is added to a SQL Server enterprise geodatabase that uses branch versioning (presumably it's a utility network), but is itself not branch versioned. When you publish the annotation feature class to a feature service, is this a separate feature service? Or are you attempting to put this in the same feature service as the utility network? Thanks, --Rich
... View more
09-13-2020
11:04 AM
|
0
|
2
|
2801
|
|
POST
|
Hi Pedro, Unfortunately, it looks like that value is not available through the Pro SDK. We will have to add this functionality in a future release. I'm not actually sure what the subnetworkLabelFieldName property is on the DomainNetwork in arcpy. In hierarchical domain networks, each feature can belong to multiple subnetworks. Because of this, the name of the subnetwork field needs to be accessible at the Tier level, not the domain network level. --Rich
... View more
09-09-2020
08:32 PM
|
0
|
0
|
935
|
|
POST
|
That's weird. I repeated my tests today, and am seeing about 3.5x improvement of InsertCursor in a callback vs. EditOperation.Create with a file geodatabase feature class. We're looking into some more ideas and will get back to you soon. --Rich
... View more
09-08-2020
04:10 PM
|
0
|
0
|
1175
|
|
POST
|
Rows in database tables are inherently unordered. When you view a table, you can order the rows based on the value of a particular field. One way to implement your up/down arrow idea would be to create an "Order" field on the table and fill it in. Then the up and down buttons would edit the rows to swap their Order values. Whether you should do this is another matter, since this could mean a lot of database edits. Why are you trying to order the rows? --Rich
... View more
09-08-2020
08:31 AM
|
0
|
1
|
4037
|
|
POST
|
Daniel, What kind of geodatabase are you using? I'm seeing significant performance enhancements with file geodatabases and enterprise geodatabases. With feature services, I'm seeing an improvement, probably because in this case the database insertions are already being batched. --Rich
... View more
09-04-2020
01:46 PM
|
0
|
3
|
1175
|
|
POST
|
There isn't, sorry. That might be good material for https://community.esri.com/community/arcgis-ideas --Rich
... View more
09-03-2020
11:14 AM
|
0
|
0
|
1849
|
|
POST
|
Hi Daniel, The snippet you are looking for is over in the Geodatabase snippets area. That snippet shows how to use an insert cursor in a CoreHost app (command-line). If you want to run this inside a Pro add-in, you probably want to do something like this: using (FeatureClass featureClass = featureLayer.GetFeatureClass())
{
// Insert rows using InsertCursor
EditOperation insertCursorEditOperation = new EditOperation();
insertCursorEditOperation.Name = "Create rows using InsertCursor";
insertCursorEditOperation.Callback((EditOperation.IEditContext editContext) =>
{
using (InsertCursor insertCursor = featureClass.CreateInsertCursor())
using (RowBuffer rowBuffer = featureClass.CreateRowBuffer())
{
for (int i = 0; i < countRowsToCreate; i++)
{
// Fill in RowBuffer using your data here
insertCursor.Insert(rowBuffer);
}
insertCursor.Flush();
}
}, featureClass);
}
I hope this helps, --Rich
... View more
09-02-2020
03:40 PM
|
0
|
5
|
3283
|
|
POST
|
Mike, Are you hiding fields at the layer level? That would explain why the field indices don't match up between the Layer and the feature class behind that layer. Note that you can always reference a row value by using the field name rather than the field index. var nameValue = myRow["name"]; --Rich
... View more
09-02-2020
10:13 AM
|
1
|
3
|
1849
|
|
POST
|
Hi Jordan, Is there any error message with the exception? Generally in an ArcGIS Pro add-in it's better to use the Editor. This adds your edit to the operation stack for undo/redo and refreshes the map. An example of creating a feature using the Editor can be found here. If you do want to use the low-level editing routines, perhaps because this is a CoreHost application, you should adjust your use of Dispose/using and add a transaction as follows: using (Geodatabase geodb = ObtainGeodatabaseWithCodeYouDidntShow())
{
geodb.ApplyEdits(()=>
{
using (FeatureClass fc = geodb.OpenDataset<FeatureClass>("6"))
using (RowBuffer rowBuffer = fc.CreateRowBuffer();
{
rowBuffer["SHAPE"] = poly;
fc.CreateRow(rowBuffer).Dispose(); //disposes the row created by CreateRow
} // using block disposes fc and rowBuffer
});
} // using block disposes geodb I hope this helps. --Rich
... View more
09-01-2020
04:14 PM
|
0
|
0
|
862
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-10-2025 09:15 AM | |
| 2 | 11-30-2025 12:23 PM | |
| 1 | 07-17-2025 08:47 AM | |
| 1 | 08-12-2022 01:35 PM | |
| 1 | 06-28-2018 04:25 PM |
| Online Status |
Offline
|
| Date Last Visited |
12-12-2025
12:03 PM
|