POST
|
Confirmed, works perfectly! Thank you all for your time and assistance, it is very much appreciated. Regards, Patric
... View more
09-10-2012
11:56 PM
|
0
|
0
|
133
|
POST
|
Hi Mike, Thanks for the feedback, I have tried it but I seem to be getting conflicting information to what you provide. According to the documentation, the default mode is Snapshot: http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer~Mode.html Gets or sets the selection mode. Default is Snapshot mode. If Where is specified, mode becomes Snapshot. Regardless, I tried to set the query mode explicitly, with the same results - the graphics collection is empty 😞 Below is the code I use to create my feature layer object, perhaps you will see something that I am doing wrong...? [PHP] FeatureLayer myFeatureLayer = new FeatureLayer { Url = "http://myserver.com/arcgis/rest/services/myproject/test_service/FeatureServer/0", ID = "TestEdit", Mode = FeatureLayer.QueryMode.Snapshot }; myFeatureLayer.Initialized += new System.EventHandler<System.EventArgs>(myFeatureLayer_Initialized); myFeatureLayer.InitializationFailed += new System.EventHandler<System.EventArgs>(myFeatureLayer_InitializationFailed); myFeatureLayer.Initialize(); [/PHP] In my myFeatureLayer_Initialized() method I then cast the sent object to a feature layer and a graphics layer and use a control break to inspect both objects, and the graphics collection is empty... [PHP] void myFeatureLayer_Initialized(object sender, System.EventArgs e) { var featureLayer = sender as FeatureLayer; var graphicsLayer = featureLayer as GraphicsLayer; .... [/PHP] Once again thanks for taking the time to respond. Patric
... View more
09-10-2012
01:47 AM
|
0
|
0
|
465
|
POST
|
Hi Antti, Using the query task to query against my feature service, I am able to retrieve a FeatureSet collection that contains all the features that match my query, but from this point I am not able to do anything with them. My goal is to delete the features returned by my query, but I am not able to get them into a FeatureLayer so that I can edit. If I add the results to a feature layer, and then delete them from the feature layer, no edits are registered, as the feature layer is in the same state as before I started. Do you have any advice I might try to accomplish my goal of deleting the features from the feature service without first adding them to a map control? Much appreciated Patric
... View more
09-09-2012
10:55 PM
|
0
|
0
|
465
|
POST
|
Hi guys 🙂 I have created a File Geodatabase checkout from SDE, but when I open it using the File Geodatabase API, none of the tables are editable - even though only one of the tables has a geometry field in it. I have tried "replica access type" full and simple during checkout, with the same results. If I create the same File Geodatabase via ArcCatalog, the tables are editable when opened with the File Geodatabase API. Sample code:
txtOutput.Text += "Opening File GDB...";
try {
// Open the geodatabase.
mygdb = Geodatabase.Open("/path/to/file_gdb.gdb");
// Open the table.
mytable = mygdb.OpenTable("\\users");
} catch (Exception ex) {
txtOutput.Text += "\r\n\r\n" + ex.Message.ToString();
return;
}
txtOutput.Text += "\r\n";
if (mytable.IsEditable) {
txtOutput.Text += "Editable";
} else {
txtOutput.Text += "NOT Editable";
}
Environment info: C# / VS2010 / .NET 4 Product Name: ArcGIS Desktop 10 Product Version: 10.0.3.3600 ArcGIS Service Pack: 3 (build 10.0.3.3600) Any advice or information would be much appreciated. Please let me know if I can provide any more information. Warm regards, Patric
... View more
01-02-2012
08:19 PM
|
0
|
0
|
3051
|
POST
|
I was experiencing the same problem, and it was because the FileGDBAPI.dll was not being picked up in my path. I manually copied it to the bin/x64/debug folder (where my executable is) and everything started working correctly. The Esri.FileGDBAPI.dll was already there since I had added it as a reference in my project. Make sure both Esri.FileGDBAPI.dll and FileGDBAPI.dll are in the same folder as your executable (make sure you are looking in the correct folder for the platform your project/solution is building...), I suspect this is where your problem lies. HTH Patric
... View more
12-29-2011
12:57 AM
|
0
|
0
|
827
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|