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
0answers
369 views
ArcObjects: How to get the size of the formatted text part only of a TextElement whose text contains formatting tags?
I'm working in ArcGIS 10.0 and Python 2.6.5. I have a string, say 'mMx', that I want to enter into a TextElement (in the data view). The lowercase letters are to be substituted with a graphical ...
5
votes
2answers
642 views
How to set a map's extent to the envelope in miles
I want to set extent of the map into envelope which sizes are defined by user in miles(kilometers, whatever human readable unit). How to make it? I wrote the following code:
static void ...
3
votes
0answers
373 views
IDatasetContainer2 CreateDataset method fails after upgrading to ArcObjects 10 [closed]
I have a Network Analyst routine that worked for 9.3 and does not work with 10. I was closely following the example at:
...
3
votes
3answers
527 views
How to use ArcGisServer from Engine?
MapServerQuerySublayer (Version 10) does not seem to support setting a definition query, although according to documentation it should using ImapServerSublayer2.LayerDescription as IMapserverSublayer. ...
4
votes
2answers
785 views
Publish MXD to server in ArcObjects C#
I have an MXD that I would like to publish to an ArcGIS server using C# ArcObjects (preferably as an MSD). I have been unable to find anything regarding this. Essentially I would like to implement the ...
5
votes
4answers
1k views
Programmatically edit/update metadata in ArcGIS 10
Has anyone succeeded in programmatically updating metadata in ArcGIS 10? Considering using Python/arcpy but ArcObjects (C# or Python/comtypes) is also a possibility.
I need to update both the FGDC ...
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 ...
5
votes
2answers
993 views
Where is the feature cache in ArcMap?
It seems that ArcMap keeps a cache for every layer which contains features data and every time wants to refresh layer or apply a change,uses tis cache.As I found,when ArcMap wants to draw a layer from ...
3
votes
1answer
618 views
Legend text wrapper (ArcGIS)
I'm interested in wrapping long legend text (in ArcGIS 9.3.1) so that the text does not exceed the layout extent. I would like to call the "GetFormattedString" Function within the ...
5
votes
2answers
2k views
No constructor defined?
In my C# Console Application, Visual Studio 2010 highlights new FeatureClassNameClass() in my below line of code and states "ESRI.ArcGIS.Geodatabase.FeatureClassNameClass has No constructors defined" ...
1
vote
2answers
444 views
Getting an empty geometry when retrieving the envelope of a GroupElement in ArcObjects: what might be wrong?
I am working in ArcGIS 10.0 (ArcMap) and Python 2.6.5 and in the Data View. I have an IGroupElement3 to which I add a TextElement and up to several RectangleElements. I want then to retrieve the ...
3
votes
3answers
1k views
How to select the vertices from a polygon?
I am writing some VBA code to extract vertices from a polygon.
I would like to ask, how to select the vertices from a polygon ?
Regards
Gary
0
votes
0answers
170 views
how to write Topology Graph Edges geometry to polyline feature class
i have created topologygraph of a polygon feature . and iwant individual ids of polylines
i want to write Topology Graph Edges geometry to new polyline feature class
any samples OR documentation ...
3
votes
1answer
424 views
Setting CQL_FILTER on WMS in ArcGIS?
Is it at all possible to use a CQL_FILTER on a WMS service in ArcGIS? Ideally we'd be able to programatically change the CQL_FILTER parameter in the WMS URL.
3
votes
1answer
193 views
Force a new AddDataDialog to open at a defined directory path
Is there a way to force the AddDataDialog to open to a specific path? I created a tool that when clicked on a specific feature will open the Add Data dialog, but I need it to open starting at a ...
5
votes
4answers
567 views
Is accessing an mxd from an Msd based SOE safe?
I have a server object extension (SOE) that returns a list of legend items based on symbols that fall within a specified extent. This allows the client to update a legend to reflect on the symbols ...
1
vote
1answer
114 views
What's the ArcGlobe equivalent of BaseDynamicLayer
I'm attempting to have a dynamic layer in ArcGlobe but obviously BaseDynamicLayer is only for ArcMap. I'm looking for something that has similar functionality where I can Display data dynamically and ...
2
votes
1answer
194 views
Persisted member in an application extension does not save to stream
I have an ArcMap extension in which I'm trying to persist a string value. When the document is saved, the public member m_LayerName in the application extension class is not being persisted. Either ...
5
votes
1answer
292 views
GDAL and ArcObjects in The Same Project - A Recipe For Disaster?
I am working on a project where I am attempting to use GDAL and ArcObjects together in the same project. Although the project itself is nothing more than a toolbar in ArcMap, I would like to use some ...
1
vote
2answers
390 views
ArcGIS: Can I modify an existing edit tool to make a new tool?
I want to create versions of the edit tools that will add a parallel, offset segment each time I add a segment regularly. Is it possible to put a wrapper around the existing tools? Or otherwise add to ...
1
vote
2answers
583 views
Improve Export PDF export speed
I have an ArcObjects vba code that exports a series of group layers listed in a table (also listed in the table of contents) to pdf. For each group layer/export the legend also changes to represnet ...
3
votes
2answers
269 views
Getting line FID from polygon ITopologyGraph
I want to export polygon Arc list to txt file for that
I created topologygraph for personal geodatabase feature class (polygon)
using ITopologyGraph::build.
I got polygon FIDs but I am not getting ...
7
votes
1answer
180 views
How can my client catch mapservice timeouts?
I've got a gp service that exports pdfs using connections to mapservices. I'd like to write to a log file when a request to a service times out. For WMS mapservices I see I can use IWmsClientEvents ...
2
votes
1answer
2k views
Create centreline from a polygon
I am working on a project to create a centerline from a polygon automatically. The user select a polygon and click a button, the centerline will create for him.
I have tried the build-in function ...
2
votes
1answer
1k views
ArcObjects add halo to label
I would like to add a white halo to labels using arcobjects. I think I need to reference the IFormattedTextSymbol interface, but I'm not sure how to implement this into my current code (see below). ...
5
votes
2answers
619 views
How to toggle layer visibility in ArcObjects?
ILayer.Visible seems to have no effect - How can I manually manage layer visibility and actually get the map control to update?
ILayer lyr = mapControl.get_Layer(i);
//this works for custom layers ...
2
votes
1answer
86 views
Does anyone know a good way to handle z ordering when using GraphicTracker in ArcEngine?
From the GraphicTracker Documentation:
The first graphic added will appear
underneath subsequent graphics if they
have overlapping display areas.
This is not true when using ArcEngine 10.0 ...
2
votes
1answer
282 views
ArcObjects ITextSymbol.GetTextSize in Python revisited: usage with StartDrawing and FinishDrawing methods
I am using ArcGIS 10.0/ArcObjects and Python 2.6. I am trying to get the usage of the ITextSymbol.GetTextSize method correct. The syntax, as established in an earlier question, is:
dblx, dbly = ...
0
votes
4answers
527 views
links to code samples
Newbie in arcobjects.
Would like to expedite the learning process by looking at existing code samples.
Please paste links which would provide code samples for common tasks.
Thanks
2
votes
3answers
1k views
Export a join table to arcmap
I have shape file (Point) and a table which I join using the following code.
public ITable JoinLayer_Table(IFeatureLayer pFeatLayer, IStandaloneTable pStTable)
{
IDisplayTable ...
2
votes
3answers
516 views
CreateFeatureClass failure in vb.net
I'm using ArcGIS 9.3.1 and trying to get the code to create a new feature class in an existing personal geodabase to work but I am having no luck. When running in debug mode from within vb.net it will ...
1
vote
1answer
167 views
Binding IActiveViewEvents::ItemReordered to method in my ATL class
May you help me please to know how I can wire this event to my method?
I have an ATL class and I need to know when a layer added to map object so that I can update my list of layers in this class.My ...
4
votes
2answers
1k views
Programmatically alter AliasName for fields defined in layer file (not underlying source)
Is there a way to alter the AliasName on a layer file only, and not the underlying shapefile or feature class? I have a few hundred layers that define joins between hundreds of tables with census data ...
4
votes
3answers
1k views
ArcMap/ArcObjects - Drawing graphics onscreen: Explanation or tutorial for Draw/Refresh/PartialRefresh methods?
I find myself woefully lacking in understanding of when, why, and how (which type) to do screen draw/refresh/partial refresh. For instance, in a standalone Python script outside the application ...
5
votes
3answers
2k views
Python, comtypes and ArcObjects: Error creating AppROT object
I am experimenting with comtypes and ArcObjects under Python 2.6.5 and ArcGIS 10 SP1. I'm using the pure Python method to wrap the ArcObjects OLBs described in this answer, but getting an error in the ...
3
votes
2answers
704 views
How to join 2 shape files and create a new shape file using ArcObjects?
Newbie in arcobject programming. Using C#. Developing a desktop application.
I have 2 shape files. One is a point shape file Called Addresses and another Polygon shape file which is called Area. The ...
4
votes
1answer
176 views
ArcObjects ITextSymbol.GetTextSize in Python: Why are the out params equal to 0?
This is related to the question I asked earlier about the syntax for this method under Python and comtypes. Now that I know the syntax and am trying to use it, the returned out params are equal to 0. ...
1
vote
1answer
824 views
Creating a new layer from query results
Newbie in arcobject programming. Using C#. Developing a desktop application.
I need to join 2 tables (POI layer which is a Point layer and a parcel layer which is a Polygon) where ...
3
votes
1answer
497 views
ArcObjects: How to get from IFeatureClass on annotation feature class to IAnnoClass?
I am working in Python 2.6 and ArcGIS 10.0 through comtypes, so I have full ArcObjects access. (See the answer I tacked onto the related question "How do I access arcobjects from python?") That ...
3
votes
1answer
192 views
ArcObjects ITextSymbol.GetTextSize in Python: How do I define two input variables that get populated by the method?
I am using Python 2.6 and ArcObjects in ArcGIS 10.0 to build and draw, among other things, graphic text on the current display. At one point I need to use the ITextSymbol.GetTextSize method. In a ...
3
votes
2answers
566 views
Using ESRI.ArcGIS.DataManagementTools.RepairGeometry
I am trying to update some code from VB6 to VB.Net 2008 and have been generally successful. However, I came across an issue where, as it processes each polygon in the shapefile, it implements the ...
1
vote
1answer
109 views
Traceflowsolver
I am working with VBA in ArcGIS.I want to use "Traceflowsolver.findpath" but I recieved an error on "SegmentCost".I need to see an example about this subject .anyone can help me?
Also my code is:
" ...
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 ...
1
vote
1answer
262 views
Checking numeric values in a field and then grouping it out in the where clause
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.
The scenario ...
3
votes
2answers
4k views
ArcObjects (vba) update selected feature/record
I would like to edit a selected feature/record via ArcMap vba, but I'm not having much luck with this code sample (see code below). I'm not getting an error, but the record selected is not updating.
...
2
votes
1answer
202 views
Process to gather raster cells under features
I need to gather individual raster cells underneath a feature in a featureclass as quickly as possible. It seems that most ArcObjects functions have problem with island polygons, multi-part polygons, ...
1
vote
0answers
237 views
export topology tables to txt files using arcobjects, generating directed graph , finding intersections
I want to export topology tables to text files:
for points:
1 id x y
for lines:
line id fompoint.x from point.y topoint.x topoint.y
for polygons:
id line id 1, line id 2...
2 arc ...
2
votes
1answer
542 views
Writing the where clause in IQueryFilter
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.
The scenario ...
3
votes
2answers
3k views
How to implement mouse down event when the user clicks on the map?
Newbie programming in C#.net.
I have a very simple desktop application in in arcmap.
I'm trying to get the coordinates when a user clicks a button on a toolbar and when click the map.
The toolbar is ...
12
votes
6answers
3k views
Convert between ESRI Geometry and WKT
It seems like there is no means of converting an ArcObjects geometry to the Well-Known Text representation (and vice versa) in ArcGIS ArcObjects API. The only thing I was able to find is conversion to ...