Tagged Questions
2
votes
0answers
26 views
drawing line from points
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
44 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).
...
2
votes
2answers
73 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
50 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
53 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
71 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 ...
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 ...
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.
1
vote
2answers
92 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 ...
3
votes
2answers
212 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
128 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
206 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
139 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
86 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
143 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
157 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
90 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
167 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
146 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
153 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
65 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
202 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
115 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
265 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
50 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
201 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
204 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 ...
0
votes
0answers
197 views
How to display points on map as a graphic using C#?
I have created map using ArcGIS Server in C#. I need to display points as a graphic.
my database consists of points lat lon values,
xval yval txnid attr1 attr2
...
3
votes
1answer
170 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?
3
votes
1answer
73 views
Delete Custom Menu
How is it possible to delete a custom root menu developed in VS?
I have gone through some walkthroughs and added an add-in that includes a button like so:
<AddIn language="CLR" ...
1
vote
1answer
179 views
Do I need an Add-in or a Stand-Alone Application for a custom form?
The type of application I want to build for ArcMap is to be run from inside of ArcMap and on a click of a button a custom form appears in front of User in which User enters certain parameters and then ...
3
votes
2answers
645 views
Find intersection points of two polyline features
I'm currently working with street intersections trying to find point(or points) where 2 given streets intersect(!disjoin). Streets are all Polyline features, and I have to work with 2 features at ...
3
votes
2answers
456 views
Flash more than one feature in arcmap using C#
How to flash many features at same time in ArcMap using C# coding?
Currently I call this function in a loop,
private void FlashFeature(IActiveView _activeView, IFeature _feature)
{
IActiveView ...
1
vote
1answer
518 views
How to use default identify tool in ArcMap from C#?
I made a custom "Find" tool(winform) which is called after specific button presed in ArcMap toolbar. In this new "Find" form I need to use identify for one or more selected items in DataGridRow. So ...
2
votes
2answers
352 views
How to get all OIDs from a table?
I have table which i need to get all the OID's from it.
I tried this code :
List<int> OIDList = new List<int>();
IQueryFilter queryFilter = new QueryFilterClass();
queryFilter.SubFields = ...
5
votes
2answers
619 views
How to insert data to a table?
I have Table in ArcCatalog, table name: (WorkOrderAss) .
This table contains 3 columns : (OBJECTID , FeatureName , Name) .
I want to insert data to this table from the code behind in C#.
Any help ...
1
vote
0answers
153 views
error in gp.execute intersect
i generate a tool to return values using area of polygons. but when i execute the tool, visual studio show an error :"Error HRESULT E_FAIL has been returned from a call to a COM component" in ...
0
votes
1answer
254 views
how to list table rows of a layer in a listbox?
I'm new in using c# and Arcengine .
i would like to list table rows of a feature in a Listbox like select by attribute in ArcGIS
such that when i click a button, table rows list in a listbox . i use ...
1
vote
1answer
149 views
Obtaining friendly names for ArcMap layer data types
Using ArcObjects, is there a way to programmatically obtain the "friendly name" for a layer's data type as seen in the ArcMap Source tab for layers in a map document?
e.g.:
File System Raster
...
4
votes
1answer
150 views
Retrieve data from FeatureClass
I have :
FeatureClass (Structure)
column (Type)
column (OID)
I am trying to get the (Type) for specific OID.
I tried to use this code but it dose not work.
IFeatureWorkspace featureWorkspace = ...
6
votes
2answers
99 views
What event is fired when a feature is edited?
When the user draws a new feature (line, point, etc.) in ArcMap, there are null attributes.
If the user enters values in these null fields what is the event that is fired?
I want to control the ...
3
votes
1answer
103 views
OID for the last added feature
How can i get the Object ID for the last feature created ?
i use m_editEvents_OnSketchFinished() event to run some code, but i can't get the OID
of the most recent added feature.
2
votes
1answer
115 views
Ghosting and Map Functionality Loss in Map View C# Arcobjects
I'm writing a C# add-in and trying to implement a piece where a user can add points to a graphics layer on the map view. The points are drawing, however the map pane has serious ghosting issues and I ...
1
vote
1answer
139 views
Dealing with tables in ArcMap
I had create a table and line feature class in ArcCatalog.
i want to deal with those tables in ArcMap.
Read
Add
Delete
Update
how could i do that?
0
votes
0answers
19 views
Problem with ObjectClassEvents_OnChange
I currently using ObjectClassEvents_OnChange event to prevent the user from make any changes on the features in ArcMap, i want to prevent the user from moving and edit the shape of the features.
The ...
3
votes
0answers
78 views
Modify feature: moving or change the shape
When the user make some edit on features on ArcMap, the user can make some changes like moving the feature ,edit the attribute or change the shape.
how could i know if the user move the feature or ...
13
votes
1answer
649 views
How to get selected Features/Geometry from Windows Clipboard in ArcMap/C#?
I have a custom tool in ArcMap 10. The Workflow is the following:
Select Features in a Layer with the "Select Features by Rectangle" tool
Copy the Features to the Clipboard using STRG+c
Select the ...
2
votes
1answer
88 views
How to cancel the edit session?
I want to prevent the user from starting an edit session under certain conditions.
How can I do that?
void m_editEvents_OnStartEditing()
{
// Code
}
1
vote
0answers
147 views
How to label every point in a dynamic feature layer?
How do I label the feature layer in a ArcGIS map with the data associated with the feature layer? I want to place the label bottom right corner of the marker symbol in the feature layer(lat-long ...
4
votes
2answers
287 views
ArcObjects: How to measure the draw time of a layer in ArcMap?
I'd like to quantitatively measure the display performance of mosaic datasets, image service layers, raster layers, feature layers, etc. in ArcMap 10.
How can I measure the draw time of a particular ...
