Tagged Questions
0
votes
0answers
26 views
add data to toccontrol
When i open MXD file, it isn't add to TOCControl, but it is dispalyed. How solve it or it is imposible?
Code from standart ArcEngine MapControll APP
private void menuOpenDoc_Click(object sender, ...
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 ...
0
votes
0answers
28 views
creating hyperlink form by arcengine into c#
I want to hyperlink three files to one point from a point layer,when I added this layer into Axmapcontroller I need to create a form to show a list of three files in order to choose by user,
I could ...
2
votes
1answer
103 views
Error in Symbol Selector Sample
This question can seems to be n00b, but really im stuck at running this Arcengine Sample code, then i got this error
i'm looking for any working example of Symbol Selector.
i'm working on XP SP3, ...
1
vote
2answers
45 views
How to edit the position of a banner text's pointer?
I have build an ITool where one can add text (ITextElement) to the map. The user can choose the symbol from the ESRI symbology. There one can choose a symbol called "Banner Text" which looks like this ...
2
votes
4answers
240 views
Why does ITopologicalOperator2 .ConstructUnion produce a somehow invalid polygon?
I try to add a single buffer around the shape of the selected features. So I step through each selected feature and add it's shape to a GeometryBag. With ITopologicalOperator2.ConstructUnion I create ...
1
vote
0answers
30 views
IMapControlEvents2.OnKeyDown not hit on Alt + key
I want to catch the Alt key plus an addionally hit key in the MapControl's OnKeyDown. I did already set MapControl's KeyIntercept to esriKeyIntercept.esriKeyInterceptAlt but the event handler doesn't ...
1
vote
0answers
71 views
How to show size/length of sketch while creating new feature?
While adding a new feature to a feature layer I like to show the size (area)/length of the sketch so that the user has a better feedback while placing the vertexes.
So I hook up MapControl's ...
2
votes
0answers
117 views
How can I free esriControls.ControlsSelectTool? Or is it leaking memory?
In my application I have isues with unfreed memory. After several tries I broke down the problem to a simplified WPF project. It opens a simple System.Windows.Window with a Button, which starts the ...
0
votes
0answers
115 views
How to delete an image from axMapControl component?
I have a problem in arcgis c#. I am using Arcgis axMapControl component and adding image to it but I can not delete image when wanted to delete from axMapControl component... I have get a exception ...
0
votes
1answer
249 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
562 views
How do I add TIFF files to one layer/raster catalog?
We have several TIFF images (already tagged with position information) we want to load as a single layer into the map. It's the first time I dig into this raster/topology thing, but at least I managed ...
1
vote
0answers
53 views
Why are the special fonts in a .mxd-project not used/found?
I have a .mxd-project file from a customer which uses special fonts (TrueType). I installed these fonts in Windows but my application (mostly a MapControl) doesn't use these fonts for displaying. I ...
1
vote
1answer
154 views
How to print semi-transparent elements?
I highlight some features with a semi transparent color via an ILayerExtensionDraw. When I print the ActiveView of the PageLayoutControl with IPrintAndExport the highlightning is not on the printout.
...
1
vote
0answers
47 views
Is there a way to reshape graphics in ArcEngine?
Our GIS-tool should allow the customer to reshape self drawn (polygon) graphic elements, like one can reshape features in edit mode with the Editor.
Is it possible to reshape graphic elements?
If ...
1
vote
2answers
174 views
How to save and load elements to/from a layer in correct z-order?
I copy elements from one layer to another like this:
IGraphicsContainer container = _mapControl.Map as IGraphicsContainer;
IGraphicsContainerSelect containerSelect = container as ...
0
votes
1answer
122 views
how to save layers in combobox
I'd like to develop an app so that user introduce the layers in comboboxes ( layers are slope,aspect,elevation etc) then user use these layers for processing in another form(processing form) and dose ...
1
vote
1answer
255 views
How do i create menu in base toolbar?
i'd like to create menus in a base toolbar like arcHdro tools or spatial analyst . how can i create menus with arcengine 9.3 in my toolbar ( the toolbar shows in arcmap )?
6
votes
3answers
566 views
How is a “Map Package” created programmatically?
Given a loaded map document (mxd) how do I find the geodatabase objects related to the contained layers? I want to copy them with the map document so the map can be moved onto each user's local ...
0
votes
1answer
259 views
how to calculate polygon area in arcengine
i'm new to use Arcengine 9.3 . i would like to create an application to calculate the selected polygon in combobox such that the user click to a button and polygon area saved in dbf .
how can i write ...
8
votes
1answer
548 views
What is the best way of refreshing the view after drawing graphics?
I draw a polygon on button click which to highlight a feature. Then I need to refresh the ActiveView to show the new polygon. This lines do work:
...
1
vote
1answer
305 views
Get all features in extent not working correctly in PageLayoutControl
I want to get all features in the current extent of my PageLayoutControl's ActiveView. I got it working for a MapControl as described here.
With my PageLayoutControl it seems that I don't get the ...
1
vote
0answers
121 views
Table not found ConvertFeatureClass how to project?
I get a Table [Streets] not found when I try to convert a shapefile to a geodatabase.
I'm thinking I'll try setting the spatial reference like in this post,
...
0
votes
1answer
201 views
FeatureClassNameClass.Open() Error, any ideas?
This code works fine on my Windows 7 64 bit machine, but fails on the target machine, Windows Server Standard SP2 64 bit.
public List<string> GetShapeFileFieldNames(string shapeFileDirectory, ...
1
vote
2answers
348 views
Is it possible to create a Balloon Callout with a leader?
Is it possible to create a Balloon Callout with a leader? I am using the following code:
public void DrawText( IActiveView view, BalloonParms balloonParms ) {
ITextElement textElement = new ...
3
votes
1answer
967 views
Label Selected Features Only
OK, I've been labeling using the LabelEngine and simple expressions and it is working for every layer. I want to offer the option of labeling only selected features and thought it would be this ...
4
votes
1answer
296 views
Need help with Merge GeoProcess task in ArcEngine (C#)
Help! Having the hardest time getting the correct syntax when adding layers as gp parameters to call the Merge_management GeoProcessing Task. Below is just one of MANY, MANY ways I have tried with ...
1
vote
1answer
95 views
Merge column data with a IFeatureClass
I have a points shapefile with City, State, Zip columns. I want to merge the column data together into a new column containing: City-State-Zip (with the hyphen).
Can I merge column data like this ...
2
votes
2answers
470 views
Save a MapControl map to an MXD
I used to know how to do this, but I must have lost the code. I tried this:
IMxdContents mxdcontents = mapControl.Map as IMxdContents;
IMapDocument doc = new MapDocumentClass();
...
3
votes
0answers
194 views
Print axMapControl contents with preview
I have a map with many feature layers on top of it. I would like to be able to print the map and feature layers either scaling it to fit a certain page size or printing it to actual scale thus ...
3
votes
1answer
277 views
Select Feature shows outline not filled
public static void SelectBy(this IActiveView view, ILayer2 targetLayer,
string filterClause, esriSelectionResultEnum selectionResult ) {
IFeatureSelection featureSelection = targetLayer as ...
0
votes
1answer
121 views
Setting the Color of a TextSymbol
public void DrawText( IActiveView view, string text, string fontName, int fontColor, float fontSize, IPoint point ) {
ITextSymbol textSymbol = new TextSymbol();
stdole.IFontDisp ...
1
vote
0answers
86 views
What does SetHistogramData do?
I run the following code:
IClassify classify = new NaturalBreaksClass();
ITableHistogram tableHistogram = new BasicTableHistogramClass();
IBasicHistogram basicHistogram = tableHistogram as ...
1
vote
0answers
178 views
UniqueValueRenderer and ClassBreaksRenderer configuration
So I can create one of these renderers based on parameters I let the user set. Some parameter combinations either create invalid conditions or no conditions at all - missing data, too many breaks or ...
6
votes
1answer
330 views
Clearing map cache - ArcGIS Engine
Is there a programmatic way to clear the cache of a map in ArcGIS Engine 10.0?
It is apparent that there is some caching scheme operating under the covers, and I'd like to clear all of its cached ...
1
vote
0answers
102 views
Annotation and Renderer Interaction
I have code that creates either a UniqueValueRenderer or a ClassBreaksRenderer and applies it. I also have code that uses AnnotateLayerProperties to set labels.
When I create a renderer and then an ...
4
votes
1answer
191 views
Closing MeasureTool Window
I'm activating the built in ArcGIS measure tool using the following code:
ControlsMapMeasureTool measureTool = new ControlsMapMeasureToolClass();
measureTool.OnCreate(_axMapControl.Object);
// set ...
3
votes
1answer
238 views
Using IRelQueryTable
I create a RelQueryTable like this to join a GeoFeatureLayer to an external table. Everything seems to work (no errors, I can look in the table and see the correct fields.) Silly question: what do I ...
1
vote
0answers
69 views
Compound Key to Relationship
If tableField = "Process ID" and layerField = "PID" then this works:
IRelationshipClass relationshipClass =
memoryRelationshipFactory.Open(
"Join",
table as IObjectClass,
tableField,
...
2
votes
3answers
265 views
List layers in directory .Net ArcObjects or plain .Net — C# preferably
Any code samples to list arcgis layer files from a directory so they can be looped over?
3
votes
1answer
1k views
How to Insert Feature into Feature Class (in Memory) ESRI
I'm looking for suggestions on how to insert a new feature instance into a feature class that is in memory -- assuming that I don't have access to the feature workspace. For example, the feature class ...
1
vote
0answers
60 views
QueryClass samples
Anyone have sample code on the actual use of a QueryClass. I can read the help and figure out how to make one but there is no code demonstrating the usage of a QueryClass.
3
votes
1answer
232 views
Draw text in PageLayoutControl in OnAfterDraw
I have a PagyLayoutControl in a print preview dialog. It shows the same extent and layers as the master MapControl. Both controls are not syncronised, because changes made in the PageLayoutControl ...
2
votes
1answer
290 views
ArcGIS Server: “MapServer is not supported with the current license.”
I am at a complete loss... I have a Server 10.0 license on my machine but the following code fails:
if (ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server) == false)
throw new ...
1
vote
2answers
303 views
How to center map in PageLayoutControl?
In my print preview dialog I have a PageLayoutControl loading the same map as the main view's MapControl. I want the map in the PageLayoutControl to center at the same position as the MapControl. ...
2
votes
1answer
109 views
What's the strongest refresh method available to ArcEngine?
I have five layers: polygon, line, and point with a single IRasterLayer file. I am programmatically setting the ILayer.Visible attribute for the Raster but the layer is not refreshing. If I zoom in, ...
1
vote
1answer
196 views
Set size of map in PageLayoutControl to print ScaleBar underneath, not within map
For printing we have a PageLayoutControl where the user can select the map extent, he wants to print. I like the map to fill only a square in the middle of the page so that the title, the ScaleBar and ...
0
votes
1answer
384 views
How to display scale on ArcGis-Engine map?
I embedded ArcEngine into a c#/wpf application and use it to display a map.
Now for print my client needs to display the scale of the map like it is used on street maps (the small bar which shows how ...
2
votes
0answers
245 views
Rendering raster layer from DTED based on height color map
I have a raster layer that was create from DTED file (dt1 specifically), created by the following code:
var rasterLayer = new RasterLayer();
rasterLayer.CreateFromFilePath(dtedFilePath);
The dted ...
3
votes
2answers
99 views
Is there a way to center an IPointCollection?
I built an IPointCollection and can display it, but I would like to display multiple copies in different locations. Is there a way to center a point collection on another IPoint?