|
POST
|
Hi Brian, A join itself is not editable, so your IsEditable() check shouldn't be needed. However, you *can* edit the individual tables that make up the join. If there is another layer with the source tables, you'll catch it that way. If you're concerned about a user programmatically editing the source tables, keep reading... I said earlier today that there isn't a way to get the Join from a table. That is incorrect. If Table.IsJoinedTable() returns true, you can use Table.GetJoin() to get the Join. Then Join.GetOriginTable() and Join.GetDestinationTable() can give you the individual tables that make up the join. Putting all of this together should give you a foolproof solution. --Rich
... View more
04-17-2019
01:38 PM
|
2
|
1
|
2743
|
|
POST
|
Any join where the source tables come from different data stores takes place on the client, and the Datastore is invalid. If you had access to the Join itself, you can get the origin and destination tables, but if you're coming directly from the layer the only thing you'll have is the JoinedTable. I don't know of a way to go from the JoinedTable to the Join. The only workaround I can suggest is to listen to events from SDE tables *and* joins (i.e., tables without a valid datastore). This may mean listening to more events than you have to. I hope this helps, --Rich
... View more
04-17-2019
08:42 AM
|
2
|
3
|
2743
|
|
POST
|
If the layer has a valid Datastore, and if the Datastore is of type Geodatabase, you can call Geodatabase.IsVersioningSupported()
... View more
04-15-2019
12:56 PM
|
0
|
5
|
2743
|
|
POST
|
If I understand this correctly, the feature layer refers to a join between an excel file and another datastore, correct? In this case, there is no actual datastore for the layer, since the join is computed in-memory.
... View more
04-15-2019
10:34 AM
|
0
|
7
|
2743
|
|
POST
|
Hi Mario, How did you connect to the Database in the first place? Does the username that you used have access to schema1? When you call Database.GetTableNames(), do both tables appear in the returned list? Thanks, --Rich
... View more
04-05-2019
08:41 AM
|
0
|
1
|
1156
|
|
POST
|
The issue should be fixed in Pro 2.4, forthcoming this summer. --Rich
... View more
03-29-2019
08:30 AM
|
0
|
6
|
3269
|
|
POST
|
It's on MapView, not Map. So it should be MapView.Active.Redraw(true) and not MapView.Active.Map...
... View more
03-25-2019
07:32 AM
|
0
|
1
|
2548
|
|
POST
|
We think this is a bug, but haven't figured out the cause or how hard it is to fix. Is using findAndReplaceWorkspacePath an acceptable work-around? --Rich
... View more
03-15-2019
07:30 AM
|
0
|
1
|
3269
|
|
POST
|
Hi Ave, We are investigating this situation now. I'll respond again when I have more information to share. Thanks, --Rich
... View more
03-14-2019
09:26 AM
|
0
|
0
|
3269
|
|
POST
|
Oops, sorry about that. The numbers for my 5 runs vary between 2438 and 2874, with an average of 2572 milliseconds.
... View more
03-13-2019
10:24 AM
|
0
|
0
|
3328
|
|
POST
|
Matt-- I created a simple feature class in a file geodatabase and executed the following code in an add-in. private string InsertRecords()
{
var geodb = new ArcGIS.Core.Data.Geodatabase(new ArcGIS.Core.Data.FileGeodatabaseConnectionPath(new Uri("path to file geodatabase")));
var fc = geodb.OpenDataset<FeatureClass>("InsertionTest");
var fcDefinition = fc.GetDefinition();
string shapeFieldName = fcDefinition.GetShapeField();
var buffer = fc.CreateRowBuffer();
DateTime start = DateTime.Now;
for (int i = 0; i < 1000; ++i)
{
buffer["Name"] = "a name";
buffer["WidgetCount"] = i;
buffer[shapeFieldName] = ArcGIS.Core.Geometry.MapPointBuilder.CreateMapPoint(i * .01, 0, 0);
fc.CreateRow(buffer).Dispose();
}
DateTime end = DateTime.Now;
TimeSpan elapsedTime = end - start;
fc.Dispose();
geodb.Dispose();
return string.Format("{0} milliseconds", elapsedTime.Milliseconds);
} The only real change I made to your code (besides my original set of suggestions) was to call Dispose() on the row returned from FeatureClass.CreateRow(). I ran the code 5 times, and it averaged 608 milliseconds, much faster than the 10 seconds you are seeing. I would suggest submitting an incident to technical support- maybe they can determine if there is something wrong with your file geodatabase. As for the geoprocessing questions, I'm the product engineer for the Geodatabase Pro SDK, and this is outside of my area of expertise. Hopefully someone on the Geoprocessing team can comment. --Rich
... View more
03-13-2019
09:43 AM
|
0
|
1
|
3328
|
|
POST
|
Matt- There's no geoprocessing code in the sample you included above. Do you have any software components that are listening to edit events? --Rich
... View more
03-12-2019
07:10 PM
|
0
|
3
|
3328
|
|
POST
|
Hi Matt, A couple of things to try: 1. Create and reuse a single RowBuffer rather than creating a new one every time through the loop. 2. Set the shape in the RowBuffer before creation rather than updating the row after creation. buffer[shapeFieldName] = ArcGIS.Core.Geometry.MapPointBuilder.CreateMapPoint(i * .01, 0) As a general rule when editing inside an Add-in, you should consider using the EditOperation class, which redraws the screen and modifies the undo/redo stack. However, if your data hasn't been added to a map yet, and you have no need for undo, then this code is fine. Hope this works, --Rich
... View more
03-12-2019
11:16 AM
|
0
|
0
|
3328
|
|
POST
|
Sverker, CoreHost applications don't have access to any of the ArcGIS.Desktop assemblies. To execute a geoprocessing tool, you have to shell out to an external process and call Python directly. --Rich
... View more
02-25-2019
07:20 AM
|
2
|
4
|
5368
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-13-2024 11:22 AM | |
| 2 | 01-29-2026 09:34 AM | |
| 2 | 01-28-2026 08:20 AM | |
| 1 | 12-10-2025 09:15 AM | |
| 2 | 11-30-2025 12:23 PM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|