POST
|
Hi, I have an ArcEditor extension (c# .net) that needs to keep a connection to ArcSDE (oracle 11g R2) continuously alive. It seems that after a certain time (say 20 minutes) the connection drops and the user is then unable to save works and the application will crash. Is there a way in ArcObject or other technique to keep the ArcSDE connection alive? Note that I use direct connect to SDE, not ArcSDE service is installed. Cheers, Pascal
... View more
05-09-2012
05:51 AM
|
0
|
0
|
424
|
POST
|
Jeff, Thanks very much for your latest reply. I can confirm that it will work; thought ArcMap expect the path to a valid MXD as the first parameter. Cheers, Pascal
... View more
10-04-2011
11:28 PM
|
1
|
0
|
692
|
POST
|
Hello There, Is there a way in .Net (c#) to get access to command line argument passed to ArcMap on starting the application. I use an extension and I wish to run ArcMap the following way: "C:\Program Files (x86)\ArcGIS\Desktop10.0\Bin\ArcMap.exe test.xmd param2 param3". Pascal
... View more
10-04-2011
02:15 AM
|
0
|
6
|
4949
|
POST
|
Hi, I cleared any projects already loaded on the mobile device. I made sure that projects folders was correctly set-up as per: f:/Projects/basemapping /*location for the base mapping (i.e. it contains the config.xml)*/ f:/Projects/myproject/mobilecache /*location for the operational layer mobile chache*/ f:/Projects/myproject/ /*location for the mobile application project*/ Cheers, Pascal
... View more
03-30-2011
10:45 PM
|
0
|
0
|
199
|
POST
|
Hi There, I have encountered two issues when working replica (checkout) in ArcMap / ArcObject v10 SP1. I am current implementing some ArcObject code to extend the ArcMap v 10 SP1 (ArcEditor Licence) to handle some database replica (checkout). Note that we are using ArcSDE 10 SP1 too with Oracle 11G. Essentially, it seems that both through the ArcMap replica wizard and ArcObject the solution keep copying related features despite setting the properties to false (i.e. do not copy related features). Furthermore, it appears that setting a definition query on table involved in a replica is also not working as per expected. Any help would greatly appreciated. Cheers, Pascal I have implemented the following code. public Boolean createReplica(LayerDefinition[] layerDefinitions, String TaskID) { try { //Define the output workspace setOuPutWorkspaceName(); //Define the source workspace setinPutWorkspaceName(); //Set the source replicate dataset IReplicaDescription2 rDDescription = initialiseReplica(layerDefinitions, m_sourceWorkspaceName, m_outPutWorkspaceName); if (rDDescription == null) throw new GISException("replica not initialised"); //If replica already exists unregister it! Workspace masterWorkspace = (Workspace)WorkspaceHelper.openFromSDEConnection(ApplicationConfigReader.Instance().GetValue("SDEFilePath")); IWorkspaceReplicas replicaWorkspace = (IWorkspaceReplicas)masterWorkspace; IReplica replica = replicaWorkspace.get_ReplicaByName("mycheckout_" + TaskID); if (replica != null) { IWorkspaceReplicasAdmin2 replicaWorkspaceManager = (IWorkspaceReplicasAdmin2)masterWorkspace; replicaWorkspaceManager.UnregisterReplica(replica, true); } ICheckOut _checkOut = new CheckOutClass(); //Set to NOT Replicate related features _checkOut.CheckOutData(rDDescription, false, "mycheckout_" + TaskID); // Note that rDDescription.FetchRelatedObjects is equal to False. // However data replicated in the FGDB includes related features! } catch (Exception e) { throw new GISException(GISExceptionCode.ERROR_FGDB_NOT_INIT, e); } return true; } private IReplicaDescription2 initialiseReplica(LayerDefinition[] layerDefinitions, IWorkspaceName sourceWorkSpaceName, IWorkspaceName OutputWorspaceName) { // Create an enumerator for source datasets. IEnumName sourceEnumName = new NamesEnumeratorClass(); IEnumNameEdit sourceEnumNameEdit = (IEnumNameEdit)sourceEnumName; for (int i = 0; i < layerDefinitions.Length; i++) { // Create a name object for the source feature class. IFeatureClassName featureClassName = new FeatureClassNameClass(); // Set the featureClassName properties. IDatasetName sourceDatasetName = (IDatasetName)featureClassName; sourceDatasetName.WorkspaceName = sourceWorkSpaceName; sourceDatasetName.Name = layerDefinitions.layerName; IName sourceName = (IName)sourceDatasetName; sourceName.NameString = layerDefinitions.layerName; // Add the name object for the source class to the enumerator. sourceEnumNameEdit.Add(sourceName); } //Set the data extraction details IReplicaDescription2 rDDescription = new ReplicaDescriptionClass(); rDDescription.Init(sourceEnumName, OutputWorspaceName, true, esriDataExtractionType.esriDataCheckOut); //rDDescription.AddDatasetNames(sourceEnumName); rDDescription.ReplicaModelType = esriReplicaModelType.esriModelTypeFullGeodatabase; IReplicaFilterDescriptionEdit rDDescriptionFilter = (IReplicaFilterDescriptionEdit)rDDescription; IReplicaFilterDescription dd = (IReplicaFilterDescription)rDDescription; for (int i = 0; i < layerDefinitions.Length; i++) { for (int j = 0; j < rDDescription.TableNameCount; j++) { IName tableName = rDDescription.get_TableName(j); if (tableName.NameString == layerDefinitions.layerName) { // The Query definition does not seem to be //set as in the replica I get all features available in the table. rDDescriptionFilter.set_TableDefQuery(j, layerDefinitions.queryDefinition); //rDDescriptionFilter.set_TableUsesQueryGeometry(j, true); String query = dd.get_TableDefQuery(j); } } } return rDDescription; }
... View more
03-08-2011
03:39 AM
|
0
|
0
|
745
|
POST
|
Hi, Did you ever find a solution to the issue you have noticed where query definition are being ignored? I have have the same issue, and I also noticed that related object are always downloaded despite set to false the parameters. See codes below. public Boolean createReplica(LayerDefinition[] layerDefinitions, String TaskID) { try { //Define the output workspace setOuPutWorkspaceName(); //Define the source workspace setinPutWorkspaceName(); //Set the source replicate dataset IReplicaDescription2 rDDescription = initialiseReplica(layerDefinitions, m_sourceWorkspaceName, m_outPutWorkspaceName); if (rDDescription == null) throw new GISException("replica not initialised"); //If replica already exists unregister it! Workspace masterWorkspace = (Workspace)WorkspaceHelper.openFromSDEConnection(ApplicationConfigReader.Instance().GetValue("SDEFilePath")); IWorkspaceReplicas replicaWorkspace = (IWorkspaceReplicas)masterWorkspace; IReplica replica = replicaWorkspace.get_ReplicaByName("mycheckout_" + TaskID); if (replica != null) { IWorkspaceReplicasAdmin2 replicaWorkspaceManager = (IWorkspaceReplicasAdmin2)masterWorkspace; replicaWorkspaceManager.UnregisterReplica(replica, true); } ICheckOut _checkOut = new CheckOutClass(); //Set to NOT Replicate related features _checkOut.CheckOutData(rDDescription, false, "mycheckout_" + TaskID); // Note that rDDescription.FetchRelatedObjects is equal to False. // However data replicated in the FGDB includes related features! } catch (Exception e) { throw new GISException(GISExceptionCode.ERROR_FGDB_NOT_INIT, e); } return true; } private IReplicaDescription2 initialiseReplica(LayerDefinition[] layerDefinitions, IWorkspaceName sourceWorkSpaceName, IWorkspaceName OutputWorspaceName) { // Create an enumerator for source datasets. IEnumName sourceEnumName = new NamesEnumeratorClass(); IEnumNameEdit sourceEnumNameEdit = (IEnumNameEdit)sourceEnumName; for (int i = 0; i < layerDefinitions.Length; i++) { // Create a name object for the source feature class. IFeatureClassName featureClassName = new FeatureClassNameClass(); // Set the featureClassName properties. IDatasetName sourceDatasetName = (IDatasetName)featureClassName; sourceDatasetName.WorkspaceName = sourceWorkSpaceName; sourceDatasetName.Name = layerDefinitions.layerName; IName sourceName = (IName)sourceDatasetName; sourceName.NameString = layerDefinitions.layerName; // Add the name object for the source class to the enumerator. sourceEnumNameEdit.Add(sourceName); } //Set the data extraction details IReplicaDescription2 rDDescription = new ReplicaDescriptionClass(); rDDescription.Init(sourceEnumName, OutputWorspaceName, true, esriDataExtractionType.esriDataCheckOut); //rDDescription.AddDatasetNames(sourceEnumName); rDDescription.ReplicaModelType = esriReplicaModelType.esriModelTypeFullGeodatabase; IReplicaFilterDescriptionEdit rDDescriptionFilter = (IReplicaFilterDescriptionEdit)rDDescription; IReplicaFilterDescription dd = (IReplicaFilterDescription)rDDescription; for (int i = 0; i < layerDefinitions.Length; i++) { for (int j = 0; j < rDDescription.TableNameCount; j++) { IName tableName = rDDescription.get_TableName(j); if (tableName.NameString == layerDefinitions.layerName) { // The Query definition does not seem to be //set as in the replica I get all features available in the table. rDDescriptionFilter.set_TableDefQuery(j, layerDefinitions.queryDefinition); //rDDescriptionFilter.set_TableUsesQueryGeometry(j, true); String query = dd.get_TableDefQuery(j); } } } return rDDescription; }
... View more
03-08-2011
03:19 AM
|
0
|
0
|
138
|
POST
|
Hi There, I have some issue trying to load an ArcGIS Server Map cache to an ArcGIS Mobile solution. I have copied the map cache generated by ArcGIS Server onto the laptop that will be used for field activities. I have also created a mobile cache for the operation layers. I have been following the instruction available in the online help: http://help.arcgis.com/en/arcgismobile/10.0/help/index.html#/Adding_Cached_Base_Maps/007v00000010000000/. I was under the impression that we would only need to copy and past the ArcGIS Server map cache to the device, no further work was required. Do we need to do anything specific to the map cache on generating through ArcGIS Server? It is all fine within the mobile project centre. I am able to see both operation layers and cached base map. However when using the mobile application outside the mobile project centre, I cannot see the cached base map. Any help would be greatly appreciated! Pascal Here are the details of the projects as per installed on the device. The project is loaded and installed on a USB hard drive, attached to the laptop. the structure o fthe project is as per follow: f:/Projects/basemapping /*location for the base mapping (i.e. it contains the config.xml)*/ f:/Projects/myproject/mobilecache /*location for the operational layer mobile chache*/ f:/Projects/myproject/ /*location for the mobile application project*/ The application amp file look this. <?xml version="1.0"?> <Project xmlns:amp="http://www.esri.com/schemas/ArcGIS/Mobile/1" name="dudley_mobile_app" updateMode="Optional"> <InitialExtent /> <DataSources> <MobileCache cacheDirectory="MobileCache" checksum="788030034"> <Layers> <FeatureLayer name="layer_1" visible="True" editable="False" queryable="True" ghost="False"> <EditableFields> <Field name="MOVE" caption="MOVE" /> <Field name="ID" caption="ID" /> </EditableFields> <ViewableFields> <Field name="MOVE" caption="MOVE" IsSearchable="True" /> <Field name="ID" caption="ID" IsSearchable="True" /> </ViewableFields> <GpsAveraging minimumPositions="5" autoStop="True" allowStopBeforeMinimum="False" /> <GpsStreaming timeInterval="5" distanceInterval="10" distanceUnit="9001" mode="Distance" /> <GpsQualityFilter allowOverride="False" maximumPdop="6" fixStatus="GpsFix" /> </FeatureLayer> </Layers> </MobileCache> <TileCacheMapLayer name="basemapping" cacheDirectory="..\basemapping" visible="True" /> </DataSources> <Tasks> <Task assemblyQualifiedName="ESRI.ArcGIS.Mobile.Client.Tasks.ViewMap.ViewMapTask, ESRI.ArcGIS.Mobile.Client"> <ViewMapTask name="View Map" description="Browse the map display" /> </Task> <Task assemblyQualifiedName="ESRI.ArcGIS.Mobile.Client.Tasks.CollectFeatures.CollectFeaturesTask, ESRI.ArcGIS.Mobile.Client"> <CollectFeaturesTask name="Collect Features" description="Add new features to the project database." /> </Task> <Task assemblyQualifiedName="ESRI.ArcGIS.Mobile.Client.Tasks.SearchFeatures.SearchFeaturesTask, ESRI.ArcGIS.Mobile.Client"> <SearchFeaturesTask name="Search" description="Search for features" /> </Task> <Task assemblyQualifiedName="ESRI.ArcGIS.Mobile.Client.Tasks.WorkList.WorkListTask, ESRI.ArcGIS.Mobile.Client"> <WorkListTask name="View Work List" description="View and manage the work list." /> </Task> <Task assemblyQualifiedName="ESRI.ArcGIS.Mobile.Client.Tasks.Synchronization.SynchronizeTask, ESRI.ArcGIS.Mobile.Client"> <SynchronizeTask xmlns:amp="http://www.esri.com/schemas/ArcGIS/Mobile/1" name="Manage Edits" description="View and manage local updates"> <PostUpdatesSettings autoPostOption="WhenCradled"> <TimeInterval minutes="-1" hours="1" /> </PostUpdatesSettings> <GetDataSettings> <Layers /> </GetDataSettings> </SynchronizeTask> </Task> </Tasks> </Project>
... View more
02-22-2011
10:51 PM
|
0
|
3
|
316
|
POST
|
Hi there, You may be interested by the example of HTML5 and the javascript API: http://www.geo-tag.info/2010/01/07/html-5-geolocation-api/ or this arcticle which will give you an overview of HTML5 and GIS: http://www.geo-tag.info/2010/10/09/750/ Pascal
... View more
02-03-2011
10:42 AM
|
0
|
0
|
274
|
POST
|
Hi There, Does any one know if snapping is available in the flex API, as it is with the silverlight one? Regards, Pascal
... View more
06-30-2010
03:39 AM
|
0
|
1
|
290
|
Title | Kudos | Posted |
---|---|---|
1 | 10-04-2011 11:28 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|