ArcObjects is a set of COM-based APIs from ESRI Inc. that are used in several of their products, ArcGIS Desktop, ArcGIS Engine and ArcGIS Server.
1
vote
1answer
183 views
ArcGIS 10.1 - c# custom geoprocessing function tool - how to populate a polyline output parameter?
I'm at 10.1SP1 with VS2010.
In my tool's ParameterInfo property I create an output GPParameter object of IGPParameterEdit.DataType GPLineTypeClass.
Then in the Execute() method I do work that ...
1
vote
0answers
38 views
ArcGIS Add-In Project to Standard Library Project
I have been developing an ArcGIS 10 Add-In tool, but requirements changed halfway through development. Fortunately, this isn't changing any of the code, but I just need to be able to compile the ...
1
vote
1answer
535 views
ArcObjects: Setting image of a command button to a partially transparent bitmap
In an ArcMap 10 add-in, I am attempting to create a toggle button of sorts whose image changes based on the button's state.
This answer describes how to set an add-in button's image programmatically ...
4
votes
1answer
104 views
How to set focus on ArcMap map window using arcobjects and c#.net
I have developed a custom dockable window with textboxes, comboboxes and a button for use in ArcMap. After the user clicks on the button in the dockable window a function is invoked. After the ...
2
votes
2answers
51 views
Using ArcGIS Server SOE to listen for edit events
Bit of a conceptual issue
I have a situation where I need to add business logic to newly created features in a feature service. When new features are created I need to preform overlays and assign an ...
3
votes
0answers
98 views
Can custom map tiles be properly rendered via ArcObjects within my ArcGIS 10.1 Desktop AddIn?
Within ArcObjects for ArcGIS 10.1, we are attempting to render pre-generated map tiles as a
basemap (group) layer. The tiles themselves are of the typical web mercator aux. spherical tiling scheme. ...
4
votes
5answers
107 views
Intersection of two lines tool
Is there any way to make intersection of two lines tool with extending lines option, so the result would be a point. the hardest part is when the lines have to be extended to intersect.
the tool will ...
1
vote
0answers
19 views
ArcObjects: Does an IEnumElement that was returned from IGroupElement3.Elements() maintain the z-order of the GroupElement?
I want to read graphics elements (TextElements and RectangleElements) from a GroupElement object (IGroupElement3) and put them into another in the same order as they were added to the original. The ...
1
vote
0answers
43 views
Quering a ArcSDE featureclass attribute table after joining
I am trying to query a ArcSDE Feature Class after joining using Iqueryfilter
I have two SDE feature classes.
1) Subdivisions : which has details of subdivision and districts (parent)
2) ...
3
votes
3answers
134 views
ArcObjects C#: select intersecting polylines
My questions seems trivial but it is a real blocker for me. So please help!!!
How can I, using ArcObjects with C#, select only those polylines in one layer that intersect with each other?
It sounds ...
1
vote
0answers
52 views
Distance Units of a Layer
I am developing an ArcGIS desktop addin. I am attempting to get the distance units (ft, mm, km, etc.) from a layer in my .mxd and display it on a windows form. How can I do this? I can access the ...
1
vote
0answers
52 views
How can I add data to a shp file attribute table from arcobjects?
I have a code that selects row data from a listview table in VB.net. I have declared that data as a variable and I can see it if I ask it to dispay a message box (see code below).
Now I would like to ...
3
votes
0answers
204 views
Alternative to IMapServer2.ExportScaleBar
Does anyone know a good alternative to the IMapServer2.ExportScaleBar function? I want to do essentialy the same task, but outside the ArcGIS Server environment. For a given map scale, predefined ...
3
votes
1answer
39 views
Access attributes of a deleted IFeature in ArcObjects 10.1
I am migrating code for an ArcGIS extension from 9.3 to 10.1.
The code is throwing an exception in one place.
My duty is just to migrate it to 10.1, so I really don't like to do any modification more ...
0
votes
1answer
117 views
Problem inserting new features to file geodatabase feature class using ArcObjects 10 SDK
I'm trying to add new feature to file GDB feature class and keep getting this error: Objects in this class cannot be updated outside an edit session. Feature class has attachments enabled (exists ...
2
votes
2answers
671 views
Collapse layers in ArcMap Table of Contents using ArcObjects
Can someone offer up a Christmas present here? I'm stuck on how to collapse all layers in my ArcMap projects (9.3). I've tried a few bits of sample code, but they all seem to fail for some reason or ...
4
votes
1answer
43 views
Why would running LocateFeautresAlongRoutes GP tool return null?
I'm currently using the LocateFeaturesAlongRoutes tool wrapper for C#/.NET for a custom tool I'm developing for ArcMap 9.3.1. I've been able to run this tool in ArcMap outside of code in a tool with ...
3
votes
1answer
34 views
How do I implement a custom IFeatureDatasetExtension?
How can I implement IFeatureDatasetExtension and register it so that ArcGIS discovers and initializes it?
In arcobjects, I see that Esri has a number of coclasses that implement ...
3
votes
2answers
322 views
How to get all features in current extent
I like to add text information to each feature in the shown map extent in my MapControl/PageLayoutControl. Adding the text is not a problem, but I couldn't find a way on how to get the features.
Is ...
1
vote
0answers
107 views
The underlying connection was closed: The connection was closed unexpectedly, WCF and ESRI Objects
I am getting this error when using ESRI objects like Geometry, Envelope etc in a WCF service. I have a class that some properties (string, int, double) but when I add ESRI type as part of this class, ...
2
votes
1answer
40 views
Arcobjects: DisplayTransformation.FromMapPoint() transforms wrong
I want to transform map coords into page coords in ArcObjects in Python. So I do, say:
>>> pApp = NewObj(esriFrame.AppROT, esriFrame.IAppROT).Item(0)
>>> pDoc = pApp.Document
...
6
votes
1answer
126 views
Why are annotation features containing both GraphicElement and TextElement objects not drawing in an ArcGIS Server map service?
I am building annotation features with Python/comtypes/ArcObjects. The annotation works great in ArcMap (10.1), but it is does not draw when published to a map service in ArcGIS Server. Each piece ...
2
votes
2answers
50 views
Creating Workspace
Can I create a Workspace without using IWorkspaceFactory.Create
I am trying to create a Workspace without specifying it's parent directory, is that possible ?
Thanks in advance.
1
vote
1answer
36 views
Mosaic RasterDataset
I use ArcGIS .NET SDK in C#.
I'm able to load some DTED files in my ArcMap and show them in proper colors. What I want is to concat/merge/mosaic some DTED files. How can I do this?
I want to mosaic ...
2
votes
1answer
35 views
ArcObjects: Equivalent/Similar object to old Avenue ObjectTag from ArcView 3.x?
I have annotation where a single annotation feature consists of one or more TextElements and RectangleElements grouped together in a GroupElement and then stored in the annotation feature. To edit ...
1
vote
1answer
125 views
Get the distance from a point on a polyline to polyline's from point
I have a polyline and a point on the polyline. I need to find the distance from the from point of the polyline to that point.
ICurve.QueryPoint method does the opposite thing. It gives a point ...
1
vote
0answers
81 views
Using custom contextMenu in Arcobjects(C# and ArcMap)
I added a new custom tree to TOC which looks like this:
IObjectClass
IFeature
IFeature ...
IObjectClass
IRow ...
made context menu using this sample ...
1
vote
0answers
28 views
code for finding gaps between polygon parcels
i am trying to write code for finding gaps between polygons, the idea is to convert polygons to polylines and checking the attribute table, each selected segment that shows two records in the tables ...
2
votes
0answers
68 views
Can I use an Update cursor with a versioned feature class which has attachments in ArcObjects .NET
I have a problem with my code (C# ArcObjects 10.1). We are trying to update and insert 10 - 15 rows at a time into a feature class hosted in ArcSDE 10.1 on SQL Server 2008 R2.
We have a feature class ...
19
votes
3answers
577 views
Are there any OpenSource ArcObjects Projects?
One of the major benefits of developing GIS applications based on opensource libraries, is that many projects spring up on top of them which are also opensource.
Well designed opensource projects ...
1
vote
0answers
33 views
Create Configurable Extension in ArcGIS Desktop
I am creating a configurable extension for ArcGIS desktop 10.1
I am not using Add-on , so please don't suggest add-on.
How can I disable some toolbars and commands, when the extension is disabled?
I ...
3
votes
5answers
3k views
Getting unique value records from a field
Building a desktop application using C#.net and arcobjects. I'm trying to retrieve records from a shape file using IQueryFilter. Having trouble writing the where clause in my scenario and the ...
2
votes
1answer
38 views
Reading Attributes from Attributed Relationship Class ArcObjects
I have an M-N relationship class with attributes. I am listening to the IRelationshipClassEvents.OnCreate Event event to see if any new relations are created. How can I read these attributes from an ...
1
vote
0answers
53 views
Is ArcFM or ArcMap leaking memory when switching between page templates?
Can anyone else reproduce the memory leak described below? Any insight into what may be causing the leak is appreciated.
I have custom code that swaps between landscape and portrait templates and ...
5
votes
1answer
1k views
How to save a layer file with a relative path
In VBA, how do you save a layer file (.lyr) with a relative path?
I have some code that loads a shapefile into ArcMap but I am unsure of how I go about using this shapefile to then save a layer file ...
3
votes
1answer
54 views
How to add image base tool control to a drop-down list in ArcGIS 9.3.1
I have to retrograde an ESRI add-in application from ArcGIS 10.1 to ArcGIS 9.3.1.
My challenge is how in the drop down list can I add base tool control( will be shown as icons inside the drop down ...
2
votes
1answer
50 views
How to save raster results of IExtractionOp?
I'm using IExtractionOp to clip a raster by polygon:
IExtractionOp operation = (IExtractionOp)(new RasterExtractionOp());
IRasterBandCollection rasterBandCollection = ...
1
vote
0answers
35 views
Joining a In_memory table with an SDE table
I have a in memory table that gets created, and want to join it to a table from SDE.
I have tried the following code.
Private Sub JoinTables(sdetable As ITable, inMemoryTable As ITable, joinField As ...
2
votes
0answers
47 views
ArcObjects running in Addin slower?
I have created a class library which does some geoprocessing. The addin calls a class that is an async process. I have ensured the thread is STA and the arcobjects are thread safe (ie. not passed from ...
4
votes
0answers
44 views
Is it possible to share temporary (InMemoryWorkspace) FeatureClass between Threads?
I'm trying to run some operations (functions) in seperate threads so that the UI is not blocked. One of this operation is the generation of a feature class copy from an existing feature class into a ...
1
vote
0answers
39 views
Picture fill symbol fails with a polygon graphic
The following code snippet successfully draws a graphic polygon and fills it with the specified picture fill symbol. When the x values for all of the points are made negative and a repeat call to the ...
13
votes
3answers
2k views
ArcObjects: Memory leak in IFeatureClass.Search (only on SDE with direct connect)
UPDATE 6/30/11: ESRI Support say they have reproduced the issue and have opened a bug report (NIM070156).
I have determined that there is a memory leak (in unmanaged heap memory) that occurs when a ...
1
vote
1answer
94 views
ArcObjects Java Calculate Line Length
I'm relatively new to programming and ArcObjects. I'm trying to simply calculate the length of a line (test.shp) using ArcObjects and Java. I've tried the code below with no luck. This is simple in ...
58
votes
5answers
7k views
How do I access ArcObjects from Python?
I want to be able to script some things that aren't exposed via arcgisscripting or ArcPy. How do I access ArcObjects from Python?
I'm working with ArcGIS Desktop 9.3.1 right now, but will be ...
0
votes
1answer
50 views
Using ESRI.ArcGIS.Display.ITemplate to draw cutom lines?
I am using ESRI.ArcGIS.Display.ITemplate to draw custom lines such as dot/dash lines on a map control.
Then, I used below codes
ESRI.ArcGIS.Display.ITemplate templateCls = new ...
2
votes
0answers
77 views
How to copy a feature class within the same GDB
I'm trying to copy/clone a feature class within the same file gdb using C#.
I've figured out that this won't work with IDataset or IFeatureDataset.
So far I only found IGeoDBDataTransfer.Transfer but ...
0
votes
0answers
30 views
How to get the nearest line to a feature?
I have features on map, and i want to get the nearest poly-line to each one.
How to write spatial query to get the nearest one.
I tried to use ISpatialFilter but i couldn't reach anything.
5
votes
1answer
96 views
how to capture the clicked point before moving a vertex
I need the location of clicked point before moving a vertex.
IVertexMoved event will provide me the coordinates of the point after vertex is moved but I need before moving.
Please help.
Regards,
...
1
vote
1answer
1k views
How do I start to debug COM error “HRESULT E_FAIL” for TableToGeodatabase geoprocessing tool?
I've got some code that creates a table using OLEDB connections to an access table. I want to convert this table to a Geodatabase table, so I ask a question How do I convert an access table to a ...
0
votes
0answers
36 views
ArcEngine crashes on IProjectedCoordinateSystemEdit.Define
I need to create a projected coordinate system in my ArcEngine (Version 10.0) application from this .prj-file. Since I don't want to load from a file (with ...
