|
POST
|
Hi Daniel, This isn't an answer to the generic question about IPluginWrapper, but in this particular case, I think you are looking for the SaveEditsAsync method on ArcGIS.Desktop.Core.Project. I hope this helps, --Rich
... View more
02-14-2019
10:04 AM
|
2
|
1
|
1547
|
|
POST
|
Hi Zeno, Unfortunately, this functionality is not included in the Pro SDK, and we don't have any near-term plans to add it. I cannot think of any sure-fire workarounds, but you might be able to get by with some of these ideas: Prefix the tablenames with something like "MyProductSystemTable." This should stop all but the most malicious users from writing to the tables (although the more curious might try to read them). Store your actual data in a blob or encrypted text string, which would prevent the read case (but again, won't stop a malicious writer from just clobbering the whole thing) Create a username/password for a system user and use a different database connection for reading these tables. Hardcode these values in your app- the system admin would need to run a script to create this other user. None of these give you what you had with workspace extensions, but I hope they are useful ideas at least. --Rich
... View more
02-13-2019
02:58 PM
|
1
|
1
|
1331
|
|
POST
|
One idea would be to write some test code that steps through every row in the table and see if one of them is corrupt in some way. The only other suggestion I have is to log this one with technical support. I don't have any idea what could cause this error. --Rich
... View more
02-01-2019
08:46 AM
|
0
|
1
|
2882
|
|
POST
|
We read the spatial type from the first feature that we find. Without an Order By, you can get features back in variable order- this would explain why it sometimes worked and sometimes didn't. As for the spatial reference error, I don't have any immediate ideas. What line of SDK code is causing the error? --Rich
... View more
01-31-2019
03:51 PM
|
0
|
3
|
2882
|
|
POST
|
Thomas, Could you try setting the QueryDescription shape type? For example, add the following after line 15 above: queryDescription.SetShapeType(GeometryType.Polyline); // assuming the underlying geometry type is polyline I hope this helps, --Rich
... View more
01-30-2019
03:11 PM
|
1
|
5
|
2882
|
|
POST
|
Hi Mody, The easiest way would be to add the table to the table of contents in the map and access it from there. This will keep it open. Another way to do this would be to create a class like the following: class MyLogger : IDisposable {
private Table _logTable = null; //instance variable – pins the table when assigned to prevent it going out of scope
// Initialize the logger object
internal Task InitializeAsync() {
QueuedTask.Run(() => {
Using(var gdb = new Geodatabase(...) {
//assign it
_logTable = gdb.OpenDataset<Table>(…)
}
});
}
//use it
Internal Task<bool> LogAsync(string message)
{
//declare on the UI is ok
Var editop = new EditOperation() { ….
//will be called on the QueuedTaskRun
editOp.Callback( context => {
//do your thing…using the instance member
Using(var rb =_logTable.CreateRowBuffer()) {
}
}, _logTable);
return editOp.ExecuteAsync();
}
//clean up
Private void Dispose() {
_logTable.Dispose();
_logTable = null;
}
}
I hope this helps, --Rich
... View more
01-30-2019
01:21 PM
|
0
|
0
|
1072
|
|
POST
|
It's hard to visualize without code, but I assume you are writing out rows to a geodatabase in some kind of loop, right? If so, just open the geodatabase outside of the loop.
... View more
01-29-2019
07:25 AM
|
0
|
2
|
1072
|
|
POST
|
That's correct, Brad. You'll need to restructure your code so that the QueryTable is called on the MCT (main CIM thread) using QueuedTask, and you create the standalone table on the UI thread.
... View more
01-28-2019
07:51 AM
|
0
|
3
|
3156
|
|
POST
|
Brad- I'm not an expert on using the ArcGIS Pro Content classes, but I think this code should do it: // Create a standalone table from the queryTable Table
IStandaloneTableFactory tableFactory = StandaloneTableFactory.Instance;
StandaloneTable standaloneTable = tableFactory.CreateStandaloneTable(queryTable, MapView.Active.Map);
// Open the standalone table into a window
FrameworkApplication.Panes.OpenTablePane(standaloneTable, TableViewMode.eAllRecords); --Rich
... View more
01-25-2019
01:22 PM
|
0
|
5
|
3156
|
|
POST
|
Brad, Do you know where this code is failing? Have you stepped through with a debugger to see the value of count? You state: "I'm having trouble getting a QueryTable to display." At the risk to taking your question too literally, you haven't included any code to display a QueryTable, just to create one. Is that the issue? (If so, do you want this to display as a table view or a layer on your map) --Rich
... View more
01-25-2019
08:29 AM
|
0
|
7
|
3156
|
|
POST
|
Are you sure you're looking at the right file geodatabase? By default, the project workspace (Project.Current.DefaultGeodatabasePath), which is the file geodatabase that is automatically created when you create a project, *is* empty. By the way, going back to your original code snippet, you should call GetDefinition() with FC, not fcFinal.
... View more
01-22-2019
10:36 AM
|
2
|
1
|
4525
|
|
POST
|
I'm not sure I understand. Once you get the FeatureClassDefinition object, what is returned when you call FeatureClassDefinition.GetName()?
... View more
01-22-2019
09:47 AM
|
0
|
2
|
4525
|
|
POST
|
Ah, looks like I forgot the closing > in my code snippet. I would suggest you get all of the feature class definitions inside the file geodatabase and make sure the list matches your expectations. To do this call FeatureClass.GetDefinitions<FeatureClassDefinition>() and iterate through the returned list.
... View more
01-22-2019
07:50 AM
|
0
|
4
|
4525
|
|
POST
|
There is actually an indexer built-in to the Feature (and Row) class. If you have a Feature variable named feature, and want to read the value of the XYZfield field you can just do the following: feature["XYZField"] More info is in this section of the geodatabase conceptual doc.
... View more
01-18-2019
02:47 PM
|
0
|
4
|
5925
|
|
POST
|
Matthew, I assume you are asking about feature classes inside a file geodatabase (a feature layer is a map layer that obtains its data from a feature class). The best way to check for feature class existence is the following: public bool FeatureClassExists(Geodatabase geodatabase, string featureClassName)
{
try
{
FeatureClassDefinition featureClassDefinition = geodatabase.GetDefinition<FeatureClassDefinition(featureClassName);
featureClassDefinition.Dispose();
return true;
}
catch
{
// GetDefinition throws an exception if the definition doesn't exist
return false;
}
} To get a list of all of the feature classes in a geodatabase, use Geodatabase.GetDefinitions<FeatureClass>() and iterate through the returned list. I hope this helps, --Rich
... View more
01-18-2019
01:52 PM
|
3
|
6
|
4525
|
| 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
|