0
votes
1answer
51 views

Layer cannot be found

public Int32 GetIndexNumberFromLayerName(String layerName) { IMxDocument doc = ArcMap.Application.Document as IMxDocument; IActiveView activeView = doc.ActiveView; ...
0
votes
3answers
48 views

Arcmap Refresh Button

I am working with ArcMap and C#. In the bottom left hand corner, there is a menu where you can toggle between Data view and Layout View, a Pause button, and a refresh button. I have created an Add-in ...
2
votes
1answer
55 views

Create a custom Identify dialog

How can I check if a point belongs to a polygon? I want to create a custom identify tool with edit option. I am using C# and ArcMap 10. My idea is to click on the polygon (building/park/etc) in ...
1
vote
1answer
32 views

Placing a cost raster in Arcmap Table of Contents in 10.2.2

We have a set of routines that have been used for writing rasters to the ArcMap table of contents from our tools. The code that always worked is this: /// <summary> /// Used for ...
0
votes
0answers
42 views

Change the Name,Tooltip of builtin Commands

When I change the name of a builtin command using the following code, I get the error, "this method cannot run on builtin commands". ICommandItem BuiltinCMD = ...
0
votes
1answer
107 views

Programmatically block Toolbar choosing in ArcMap 10.1

With an extension I can block ArcMap's Customize menu using following code line: ArcMap.Application.LockCustomization("password"); But, it makes no sense since by right-click on Toolbar docking ...
0
votes
0answers
102 views

ArcMap throws NullReferenceException for OnClick event of Add-In

I have this below code which is a toolbar button to open a dock able window in ArcMap 10.2 Desktop application and what happens is that I am able to install the toolbar button but when I a click that ...
1
vote
2answers
281 views

C# code to display result of spatial query on arcmap

the problem is i have to display those points on arcmap that lies inside the envelope.I am explaining what i have done so far. I have one point feature class say featureclass ,open it and used one ...
0
votes
0answers
30 views

Button Driven Switch Version

Using ArcMap 10 & C#, I'm trying to switch the map to display a certain version of our SDE database when a custom button is selected and I'm having a heck of a time finding what I thought would be ...
0
votes
0answers
19 views

Adding a layer to ArcMap

I have create "Draw polylines tool", but not know how to create spacial layer to store polylines only in this layer. It's possible locate polylines in own layer, I mean that this layer will be ...
1
vote
1answer
327 views

Cannot register assembly

So I am trying to control Arcmap with my addin and I tried to add a command. So I did and i got this error: Error 6 Cannot register assembly "C:\Users\Administrator\documents\visual studio ...
1
vote
0answers
24 views

How to send variables from gis addin own web browser to gis file

I am a complete beginner with GIS. So I want to be able to go to the coordinates in arcmap I fill in in my php page. I've got this now: The variables inserted in the textfield should be the ...
4
votes
2answers
311 views

How to create new legend using ArcObjects?

I am trying to add simple legend to the map. I wrote some simple test code below to see what happens but it did not work. var map = activeView.FocusMap; IGraphicsContainer ...
2
votes
1answer
116 views

How to close the current mxd document through arcmap add-in

First, I open a mxd document named A in arcmap, then i use my add-in to generate another mxd document named B, then I use ArcMap.Application.OpenDocument(arcmapMapFileName); to open the ...
1
vote
0answers
73 views

How to achieve the statusbar as the same effect with the arctoolbox‘s tool called in ArcMap add-in?

How to achieve the statusbar as the same effect with the arctoolbox‘s tool called in ArcMap add-in? i do not know how to use the progressbar as a result of my project involves in a large mount of ...
1
vote
3answers
509 views

How to change feature color?

I have feature (polygon) was gotten by spatial query from the map. How to change its color? I used this code but it didn't work IMxDocument mxDocument = application.Document as IMxDocument; ...
3
votes
1answer
131 views

How to get any changes happened in the current SDE version?

How to get any change done on the map in the current version of sde. using arcObjects e.g. if i had a line on the map. and in the current sde version i changed the length of that line. how to get this ...
0
votes
2answers
611 views

ArcObjects - accessing layer data table from C#

I've spent all day yesterday trying to trace all my the errors but I'm just completely stuck now. Google isn't helpful either. I'm trying to create a small C# tool which opens my MXD file in ...
2
votes
2answers
1k views

get valules for all fields from selected features

The following code works for retrieving values within a particular field(Name1), but I want to retrieve mulitple fields. Am I to create multiple variables for each field? IMxDocument pMxDocument = ...
3
votes
1answer
99 views

How can I hide a tool from command window under category

I have created a tool, a button and a dockable window under one project. To open/close the dockable window, button is used. For some specific work, by clicking some specific button from dockable ...
3
votes
0answers
96 views

drawing line from points [duplicate]

I have a series of XY coordinates. I want to use these points to draw a line in ARCMAP using arcobject10.1 using c#. I have saved this in a table inside geodatabase.Am i supposed to create a feature ...
1
vote
0answers
186 views

How to get hold of the Activated Event for the ArcMap window?

I am using ArcObjects 9.3 .NET. In my ArcMap dockable window, I have a single element host hosting a WPF user control (That's the only means of using WPF for ArcMap extensions as far as I know). ...
1
vote
1answer
262 views

FeatureDataGrid and FeatureDataForm will not commit to database or input data

This is the second time that I have posted about this. In my previous question they told me I needed to enable the Feature Access capability. I did this and then it said I needed to have a Data Store ...
3
votes
2answers
258 views

How to use shortcuts in dockable windows?

I have developed a custom dockable window with textboxes, comboboxes and buttons for use in ArcMap. After the user clicks on a button in the dockable window a function is invoked. How can I invoke the ...
1
vote
1answer
141 views

What is the preferable value for setting tolerance for selecting a feature

I know it's really a basic question. But I am really confused about this. For selecting a point feature by mouse click, we need to set a tolerance value to create the envelope. And here is the problem ...
3
votes
1answer
358 views

Set unique values to different groups programmatically

I have a polyline feature layer. After doing some computation, I update a field of that layer and want to set unique color for different value of that field. We can do this from symbology using unique ...
1
vote
1answer
358 views

How to create dynamic sub-menu in ArcMap?

I created a static menu contains 3 static items like in this link create menus, I want to add a sub-menu and get the menu's items from database like in this image: I already did the left part with ...
6
votes
2answers
752 views

ESRI ArcMap Add-in Config.esriaddinx

I'm in the process of converting an older ArcMap extension to an Add-In in C# and I am trying to best take advantage of the XML based configuration. Config.esriaddinx works great for the basic set up ...
4
votes
1answer
466 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 ...
1
vote
1answer
266 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.
1
vote
2answers
189 views

How to drag a layer from ArcMap Add-in into its MXD?

I have a simple ArcMap Add-in that displays all featureclass names in a database inside of a ListBox. If I select a name or multiple names in the listbox, how can I drag and drop it in ArcMap? Just ...
4
votes
2answers
891 views

Split a Polyline into small segments

I am writing an addin, which needs to split a polyline into a number of segments taking the number of segments as an input from user. How can I accomplish this?
0
votes
1answer
219 views

Given a C# ArcMap custom toolbar with engine source files in a folder is there a way to install the toolbar and engine without going through VS?

I was given ArcMap toolbar and tool engine files without instructions on how to install but the code was done by someone else and it should work. How do I install it in ArcMap 10? I attempted to add ...
3
votes
1answer
546 views

How to find polygon neighbors by rook and queen contiguity in a feature class?

I have a feature class containing several polygons. I would like to find all polygons that have a common border to a polygon of my choice. This can be done with the ISpatialFilter and ...
5
votes
2answers
432 views

Is it possible to modify the ArcObjects IProgressDialog2?

It turns out that the best way to run long tasks in ArcMap is to use the IProgressDialog2. The BackgroundWorker in combination with ArcObjects (STA Threads) is a mess. However, it seems that the only ...
1
vote
1answer
285 views

How to set a color for a rectangle?

I had drawn a rectangle by adding element to graphics container like the code below: IGraphicsContainer gc = mxDoc.FocusMap as IGraphicsContainer; gc.Reset(); IRectangleElement rectangleElement = new ...
3
votes
1answer
309 views

How to get X and Y coordinate values of the map?

I want the upper right and lower left coordinate of the exposed portion of the map, and for the whole map. What is the way to do this?
1
vote
1answer
451 views

How to change the view from layout view to data view using c# code in ArcMap?

How to change the view from layout view to data view using c# code?
-1
votes
1answer
244 views

How to get the nonspatial tables in the TOC into a combobox in ArcMap?

I'm new in using Arcobject . i'd like to set dbf of ArcMap TOC to the Combobox Items. How can i set dbf files to items of combobox using C# programming and Arcobject ?
2
votes
1answer
634 views

How to draw a rectangle a the map using C#?

I have two points, Ipoint upperRight; and Ipoint lowerLeft; points. from the previous points i can get the height and the width for the rectangle. How can i draw a rectangle on the map?. I think i ...
1
vote
1answer
424 views

How to get pixel size of Data Frame in arcMap layout?

The data frame where the map diagram will be presented in, appeared on the screen not in the actual size which is part of A4 page template, I want to get the actual size by getting the pixel size ...
2
votes
1answer
321 views

How to display custom context menu during create feature task?

I have a created a custom context menu using ICommandBar and am displaying it on create feature mouse-down right click. I am constructing a point collection on each mouse down and then creating a ...
1
vote
1answer
165 views

How to programmatically Pause the drawing of the Map?

In ArcMap, there is a button to Pause the map's drawing. How do I programmatically call it from ArcObjects Code, before and after my heavy code runs?
3
votes
1answer
897 views

Feature Layer is not showing the points on the map

I have a simple feature layer. The points will show up if I put the URL in a DynamicMapServiceLayer, but I need to use maptips, so that will not work. Below is my relevant XAML. If you need anymore ...
2
votes
0answers
219 views

AxSymbologyControl via WindowsFormsHost in WPF (ArcMap Add In Project)

I need a way to offer the user a choice of color ramps for the ClassBreaksRenderer. I came across the AxSymbologyControl which was designed for WinForms. I tried also ESRIs (WinForms) example project ...
2
votes
0answers
545 views

Using labels/attributes from arcMap to display information

I am wanting to take the labels/attributes that are used in arcMap and display them in an InfoWindow when the user clicks on the map point. I really have no idea where to start on this so any help ...
2
votes
1answer
100 views

How to output the ActiveView to a Jpeg image

I have an ArcGIS Desktop extension and I need to extract images from the map. How can I programmatically output the active view to a jpeg image?
1
vote
1answer
483 views

Implementing Custom Selection Tool (Adding to current selection) with ArcObjects

I am trying to implement a custom selection tool in ArcMap 9.3.1 that is functionally similar to the default ArcMap selection tool with "Adding to current selection" enabled. ie. the user can click to ...
1
vote
2answers
727 views

IFeature.Store seems to bypass edit sessions and cannot be rolled back. Why?

I'm working with ArcObjects edit sessions for the first time and am having some trouble with it. The C# code I am about to discuss is part of an ArcMap 9.3 extension DLL. My problem is that calls to ...
4
votes
1answer
408 views

Programatically take screenshot of map extent in ArcMap 9.3

Is it possible to programatically capture a screenshot of the current map extent (the map area with any active displayed layers) in ArcMap with the ArcObjects .NET SDK?