POST
|
I have created a database replica for offline use. I would like to make a relationship query to the offline geodatabase. How can I do this? I've found documentation on how to do a basic query to a table and it's very simple (just table.Query()). However, the QueryRelatedAsync method requires the RelationshipID. How is the ID aquired if the app is in offline mode and doesn't have access to the feature server? There doesn't seem to be any documentation on the offline relationship query.
... View more
12-15-2014
03:44 AM
|
0
|
4
|
3573
|
POST
|
It's the sample code on this page https://developers.arcgis.com/net/desktop/guide/create-an-offline-map.htm The example code is on the button click event (async void) so the "immediate return" behaviour is not a concent here...
... View more
11-27-2014
01:25 AM
|
0
|
0
|
399
|
POST
|
I see. I was using another example from ESRI that didn't have the lines: ReportStatus("Waiting on geodatabase from server...");
var statusResult = await tcs.Task; Thanks for the fast reply.
... View more
11-27-2014
01:10 AM
|
0
|
2
|
399
|
POST
|
I'm calling the GenerateGeodatabaseAsync method (with the await keyword) of GeodatabaseSyncTask and the method returns immediately. The method is marked as Async, so I'd expect it to wait until the task has been completed. Can anyone confirm this behaviour or explain why it behaves differently from normal Async behaviour? Sample: public async Task<GenerateGeodatabaseResult>(Uri uri)
{
var gdbTask = new GeodatabaseSyncTask(uri);
// ...
// this returns immediately (as if it was an async void method)
return await gdbTask.GenerateGeodatabaseAsync(gdbParams, GdbCompleteCallback, new TimeSpan(0, 0, 5), progress, cancelToken);
}
... View more
11-27-2014
12:47 AM
|
0
|
4
|
2456
|
POST
|
The JSON response is simply:
{
"resultUrl":"",
"replicaName":"Ags_Fs_1415789855240",
"submissionTime":1418295480000,
"lastUpdatedTime":1418295489000,
"status":"Failed",
"error":
{"code":500,"description":"Failed to synchronize."}
}
So it's not very helpful I just got more information that someone had changed service's the target database from Oracle XE database to Oracle 11g Enterprise. The Sync capability is not enabled on the new database, so there's the reason. However, the error message should be more descriptive ("failed to syncronize: sync capability not enabled")!
... View more
11-12-2014
03:04 AM
|
0
|
1
|
622
|
POST
|
I don't think I have the access to the JSON message. The only information available is the Exception variable in the SyncCompleteCallback method. Also the GeodatabaseStatusInfo variable is null, so there's nothing there either.
... View more
11-12-2014
02:45 AM
|
0
|
8
|
622
|
POST
|
After I've created an offline replica I try to sync the changes back to the server. I get an exception message saying "An exception occured: Error code '500' : 'Failed to synchronize.'" but I don't get any more information. I've googled for the error message and if I would do this from the ArcGIS Server's REST interface (web browser), I'd get more details. Is this a limitation on the ArcGIS Runtime Desktop API for Microsoft .Net? Is there any way to get any more information on the exception? Maybe this could be implemented in the future release (inner exception maybe?). The code worked yesterday but now someone has done something on the server and I'd like to know what's wrong...
... View more
11-12-2014
12:58 AM
|
0
|
10
|
5125
|
POST
|
The weird behaviour can be caused by the async code deadlocks and race conditions. Usually they are caused by defining an async void method and awaiting it. Maybe you should check your code for that. Also see this: Async Best Practices for C# and Visual Basic | TechEd Europe 2014 | Channel 9
... View more
11-12-2014
12:45 AM
|
0
|
0
|
433
|
POST
|
Because we have a lot of relationship classes from features to tables, and per layer sync downloads the whole contents of a table and not just the related records. We're using our own ArcGIS Server Feature services.
... View more
11-10-2014
11:09 PM
|
0
|
1
|
726
|
POST
|
I need to use per replica sync model with ArcGIS server, but the service's Supports PerReplica Sync: false . How do I enable it? The Supports PerLayer Sync is true for all services. ESRI's documentation only says this (it doesn't describe what needs to be done to enable it): supportsPerReplicaSync will be true if the layers can be synchronized together, and the service will accept a value of perReplica for the sync model during the createReplica operation. If supportsPerReplicaSync is false, then the only sync model supported is perLayer. Only present if syncEnabled is true. Also, how do I know when "the layers can be synchronized togeter"? Is there a setting/a state which defines it? We need this for the offline sync to work with ArcGIS Runtime Desktop API for Microsoft .Net (10.2.4.0).
... View more
11-10-2014
03:10 AM
|
0
|
3
|
4480
|
POST
|
Yes, I wrote a helper class for making the LicenceInitializer a singleton. /// <summary> /// ArcObject License Helper for initializing the license. Wrapped to this helper class because MSTest always creates a new instance of /// a test class for EACH TEST that it runs and LicenseInitializer must only be initialized ONCE. /// </summary> public static class LicenseHelper { private static LicenseInitializer licenseInitializer = null; /// <summary> /// Initialize the ArcObjects license. Must be run before any usage of AO objects. /// </summary> public static void InitializeLicense() { if (licenseInitializer != null) { return; } licenseInitializer = new LicenseInitializer(); licenseInitializer.InitializeApplication(new[] {esriLicenseProductCode.esriLicenseProductCodeArcView}, new[] {esriLicenseExtensionCode.esriLicenseExtensionCodeDataInteroperability}); } /// <summary> /// Shutdown and release the ArcObjects license. AO objects cannot be handled after this method is called. /// </summary> public static void ShutdownApplication() { if (licenseInitializer != null) { licenseInitializer.ShutdownApplication(); } } } Now you just put the LicenseHelper.InitializeLicense(); in the test class' constructor and LicenseHelper.ShutdownApplication(); to the cleanup method.
... View more
11-06-2012
10:54 PM
|
0
|
0
|
307
|
POST
|
I have set up a unit testing class for our ArcMap extension. I need the ArcObjects for generating sample geometry objects etc. And for that I need the LicenseInitializer. Everything works fine for the first test, but the second test always fails at error: Error: System.Runtime.InteropServices.InvalidComObjectException: COM object that has been separated from its underlying RCW cannot be used.. at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, ref Boolean pfNeedsRelease) at ESRI.ArcGIS.UCOMIArcGISVersion.GetActiveVersion(ref esriProductCode code, ref String ver, ref String path) at ESRI.ArcGIS.RuntimeManager.get_ActiveRuntime() at UnitTestHelpers.LicenseInitializer.InitializeApplication(esriLicenseProductCode[] productCodes, esriLicenseExtensionCode[] extensionLics) in LicenseInitializer.Designer.cs: line 50 If I run just one test, everything works ok, but it's the second test that causes the error. I also noticed that if I debug the test and pause it for a while, then the error also rises. But if I just run the test without any interruptions, it runs fine. How should I create and shutdown the initializer properly? Any other suggestions how to make this working?
... View more
05-15-2012
02:49 AM
|
0
|
2
|
2394
|
POST
|
We're developing an add-in to ArcMap 10. Now we need to implement a functionality that locks a single feature (or geometry) from editing. Example: 1. User A starts editing a feature X. 2. The feature X is locked from editing by all other users. In step 1 I need to set the lock. How do I do that? Can I use sde.SDE_state_locks or sde.SDE_object_locks tables somehow? In step 2 I need to read the lock state for an object and show a message about the lock (who, when). How can this be done? We're using both a geodatabase and an SDE database (Oracle). I don't need a whole solution here. Just some tips and hints to point me to the right direction, because I'm quite new to ArcObjects 🙂
... View more
05-04-2012
12:06 AM
|
0
|
2
|
385
|
POST
|
4) Throw it in the GAC. Visual Studio Command Prompt --> Run as Administrator --> gacutil /i Microsoft.VisualStudio.Shell.9.0.dll Let me know if this works for you guys -- I'm curious to see if there are other issues. At first it gave me an error, but then I checked the build plan's MSBuild options (TFS 2010). I changed the MSBuild Platform to x86 and then it succeeded! Thanks for everyone for their help! 🙂
... View more
04-27-2012
09:18 AM
|
1
|
0
|
942
|
Title | Kudos | Posted |
---|---|---|
1 | 04-24-2015 12:27 AM | |
1 | 04-27-2012 09:18 AM | |
1 | 02-05-2015 03:13 AM | |
1 | 07-06-2016 04:57 AM | |
10 | 02-06-2015 05:05 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|