|
POST
|
I am trying to determine if the Feature Access capablity has been enabled on an IServerObjectAdmin2. I can get a list of the IServerObjectExtensionTypes as shown below, but how can I tell if the IServerObjectExtensionType is enabled? private static void listServices() { IServerObjectAdmin2 soAdmin = (IServerObjectAdmin2)gisServerConnection.ServerObjectAdmin; IEnumServerObjectConfiguration enumConfigs = soAdmin.GetConfigurations(); enumConfigs.Reset(); IServerObjectConfiguration soConfig = enumConfigs.Next(); while (soConfig != null) { IServerObjectConfigurationStatus soConfigSatus = soAdmin.GetConfigurationStatus(soConfig.Name, soConfig.TypeName); serviceTable.Rows.Add(soConfig.Name, soConfig.TypeName); IEnumServerObjectExtensionType enumServerObjectExtensionType = soAdmin.GetExtensionTypes(soConfig.TypeName); enumServerObjectExtensionType.Reset(); IServerObjectExtensionType serverObjectExtensionType = enumServerObjectExtensionType.Next(); while (serverObjectExtensionType != null) { MessageBox.Show(serverObjectExtensionType.Name); serverObjectExtensionType = enumServerObjectExtensionType.Next(); } soConfig = enumConfigs.Next(); } } Thanks for your assistance, Mele
... View more
07-27-2011
01:07 PM
|
0
|
1
|
694
|
|
POST
|
I have published a Toolbox to ArcGIS Server as a geoprocessing service and am trying to access the service via .NET. I get an error message telling me the job has failed after running the following code: Geoprocessor gp = new Geoprocessor(); gp.AddToolbox(@"http://vmascgis01/arcgis/services;PrintLISMap"); gp.OverwriteOutput = true; IVariantArray parameters = new VarArrayClass(); parameters.Add(@"D:\workspace\Temp\Untitled.mxd"); parameters.Add(@"D:\workspace\Temp\Base_Map.lyr"); parameters.Add(@"D:\workspace\Temp\new.mxd"); IGeoProcessorResult result; result = (IGeoProcessorResult)gp.Execute("AddLayerToMap", parameters, null); The ArcGIS Server has ArcGIS Server security in place and this looks like the problem because if I access the toolbox directly via its location on disk, the code works. How do I pass credentials to an ArcGIS Server Geoprocessing Service?
... View more
06-09-2011
08:07 AM
|
0
|
1
|
687
|
|
POST
|
I am using ArcObjects to delete features and append features to a File Geodatabase. The last time this process ran, I got the following error message: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt" The Feature Class was corrupt after the processs. I reran the process in ArcCatalog using ArcToolBox and on the the second attempt, I was able to successfully delete and append features. Any ideas on what causes this error and more importantly, how to prevent it in the future? Thanks, Mele
... View more
04-07-2011
08:10 AM
|
0
|
2
|
4963
|
|
POST
|
I have a SOAP SOE that I am trying to access from a .NET console application as a service reference. The SOE resides on an ArcGIS Server that implements security. We are using windows authentication to secure our Map Services. Below is the code to call a method from the SOE: using (PrintMap_From_LIS_SOE.ServiceReference3.TE_Coll_Offset_SOEPortClient te = new TE_Coll_Offset_SOEPortClient()) { string coords = te.OffsetCoords("N 94TH ST", "E CACTUS RD", 711670, 944759, "E", 140); } I was able to access the SOE before we implemented security and now I am getting this message: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'. How do I pass credentials to the SOE? Thanks, Mele
... View more
02-19-2011
11:07 AM
|
0
|
5
|
1136
|
|
POST
|
Here is what I ended up doing. private static IGPFieldMapping MapFields(string strinFC, string stroutFC) { IGPUtilities gputilities = new GPUtilitiesClass(); IDETable inTableA = (IDETable)gputilities.MakeDataElement(strinFC, null, null); IDETable inTableB = (IDETable)gputilities.MakeDataElement(stroutFC, null, null); IArray inTables = new ArrayClass(); inTables.Add(inTableA); inTables.Add(inTableB); IGPFieldMapping fieldmapping = new GPFieldMappingClass(); fieldmapping.Initialize(inTables, null); IFields fields = fieldmapping.Fields; return fieldmapping; } Here is another example from ESRI Geoprocessing field mapping: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/00010000042p000000.htm
... View more
02-10-2011
05:20 AM
|
0
|
0
|
722
|
|
POST
|
From what Support said, a GPTool is being worked on that will provided this functionality
... View more
02-09-2011
02:54 PM
|
0
|
0
|
291
|
|
POST
|
I changed my code to pass in a string to the Feature Class (.sde file) and it works much faster. Geoprocessor does not seem to operate as well on IFeatureClass as it does on a string. Mele
... View more
02-09-2011
02:53 PM
|
0
|
0
|
601
|
|
POST
|
I would like to be able to duplicate the Field Mapping that is generated when using the "NO_TEST" option in the schema type parameter for the Append Tool in ArcCatalog in .NET I am using ESRI.ArcGIS.DataManagementTools.Append and would like to be able create the same type of field mapping that is used by the GUI so that the code makes it "best guess" at field mapping if the fields are in a different order within the input and output Feature Classes. I see that there is a IGPFieldMapping Interface, but have not seen examples that are of use to my case. Let me know if you have done anything like this in .NET Thanks, Mele
... View more
02-02-2011
07:12 AM
|
0
|
2
|
955
|
|
POST
|
I am using ESRI.ArcGIS.DataManagementTools.Append and ESRI.ArcGIS.DataManagementTools.DeleteFeatures in .NET to manage feature classes in a File Geodatabase. I am deleting features from the File Geodatabase than appending new ones from an ArcSDE Feature Class. If the schemas do not match, I would like to stop the program before Delete Features. The Append tool has some way to check the schemas and I would like to duplicate this in code before deleting any features. If the append Tool can't append, I would like to not delete any features. Any suggestions on how to check the schemas of the input and output Feature Classes to determine if they match according the criteria of the Append Tool? Thanks, Mele
... View more
02-02-2011
07:05 AM
|
0
|
1
|
786
|
|
POST
|
I am using ESRI.ArcGIS.DataManagementTools.DeleteFeatures to delete from a File Geodatabase using the Geprocessor object in .NET and it is very slow (minutes). The same code run against an ArcSDE Geodatabase is fast (seconds). The GDB is ArcGIS 10 as is the code I am building my .NET app with. Any thoughts on why this could would run slower against a File Geodatase? Thanks, Mele Below is the code I am using to call DeleteFeatures. ESRI.ArcGIS.Geoprocessor.GeoprocessorGP = new ESRI.ArcGIS.Geoprocessor.Geoprocessor(); public static void DeleteFCFeatures(IFeatureClass FC) { try { DeleteFeatures deleteFeatures = new DeleteFeatures(); deleteFeatures.in_features = FC; ITrackCancel Itrack = null; RunTool(GP, deleteFeatures, Itrack); } catch (Exception ex) { Console.WriteLine(ex.Message + "\n\n" + ex.StackTrace); } } private static void RunTool(Geoprocessor geoprocessor, IGPProcess process, ITrackCancel TC) { try { geoprocessor.Execute(process, null); processGPMessages(geoprocessor); } catch (Exception ex) { Console.WriteLine(ex.Message); processGPMessages(geoprocessor); } }
... View more
01-27-2011
08:16 AM
|
0
|
2
|
2625
|
|
POST
|
I trying to get the ILabelingDescription for an IMapServer3 layer and then use it for the AnnotationProperties of an IGeoFeatureLayer. My code for the getting the ILabelDescription is shown below: private ILabelingDescription GetLabelingInfo(int mapLayer) { IServerSymbolOutputOptions pSSOO = serverContext.CreateObject("esriCarto.ServerSymbolOutputOptions") as IServerSymbolOutputOptions; pSSOO.ConvertLabelExpressions = true; ILongArray longArray = serverContext.CreateObject("esriSystem.LongArray") as ILongArray; //new LongArrayClass(); longArray.Add(mapLayer); ILayerDrawingDescriptions lyrDrawDescs = null; lyrDrawDescs = (ILayerDrawingDescriptions)mapServer.GetDefaultLayerDrawingDescriptions(mapServer.DefaultMapName, longArray, pSSOO); ILayerDrawingDescription lyrDrawDesc = lyrDrawDescs.get_Element(0); IFeatureLayerDrawingDescription2 flDrawDesc = (IFeatureLayerDrawingDescription2)lyrDrawDesc; ILabelingDescription pLabelDescription = flDrawDesc.LabelingDescription; return pLabelDescription; } How can I apply this ILabelingDescription to IGeoFeatureLayer.AnnotationProperties? What casts are need? Thanks, Mele
... View more
12-20-2010
06:16 AM
|
0
|
0
|
1534
|
|
POST
|
I used the IRasterLayer.CreatefromRaster method with success. Thanks to both of your replies as this pointed me in the right direction. Mele
... View more
12-17-2010
02:39 AM
|
0
|
0
|
794
|
|
POST
|
Thanks Robert. I will give this a shot. I couldn't find it so I appreciate your assistance with pointing me in the right direction.
... View more
12-15-2010
01:35 PM
|
0
|
0
|
794
|
|
POST
|
I am using IMapServerDataAccess to get an IRaster using the following: IRaster raster = (IRaster)dataAccess.GetDataSource(mapServer.DefaultMapName, mapLayer); How do I then add that IRaster as an ILayer to ArcMap? I have tried casting IRaster to IRasterLayer with no luck. Do I need to cast the IRaster to another object first? Thanks for any assistance. I am working in C#, but will gladly take other samples if available. Mele
... View more
12-15-2010
10:48 AM
|
0
|
4
|
1126
|
|
POST
|
We have non Feature Linked Annotation which I am copying to the Feature Linked Annotation Feature Class with an ICommand. The feature linked anno shows water main size and material. Once copied, the FeatureID of the feature linked anno is calculated to the OID of the water main feature which contains its annotation. This procedure works well, but I am looking for a solution to update the annotation so that it reflects the current values in the related water main feature. Our current thought is to calc a value in a field in the related water main feature that is used to derive the feature linked annotation. What we would do is to calculate the value to itself and then this would trigger the update of the annotation. Is there any methods in ArcObjects that would update the annotation without having to calculate a value in the water main feature? Thanks, Mele
... View more
11-14-2010
04:48 AM
|
0
|
4
|
2989
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-20-2025 05:21 AM | |
| 1 | 03-13-2015 04:39 PM | |
| 1 | 09-18-2025 08:33 AM | |
| 1 | 05-12-2025 03:17 PM | |
| 1 | 08-15-2025 03:36 PM |
| Online Status |
Offline
|
| Date Last Visited |
Tuesday
|