Hot answers tagged

3

While the SDK is required to create new projects (the templates that appear when you choose File>New Project), it should be possible to compile existing projects without the ArcObjects SDK. Also, I've heard: 1) you don't really need Visual Studio to compile - you can use MSBuild, which is now part of the .NET framework installation. 2) you can compile ...


3

I've used Richie Carmichael's code from his blog post. In a later post he said he fixed some memory leaks and uploaded to arcscripts, however that link is broken. I'll look for the code - I think I downloaded it years ago. Anyway, here is the code from his first post. Take a look at the azimuth outputs. The code uses the "projection engine" dll. I've ...


2

There's a few problems here. First IMxDocument.FocusMap is read only, you can't change the extent from here, use IMxDocument.ActiveView instead. Instead of projecting your point (point.Project(spatRef);) you need to set it by using IPoint.SpatialReference (inheritied from IGeometry class): point.SpatialReference = spatRef; I have found it better to pan an ...


2

As per @MichaelMiles-Stimson comment, the arrow size has to be set before it is cast to mapSurround. pArrow.Size = 125 Dim mapSurround As IMapSurround mapSurround = pArrow ' QI The other problem was in the 7th last line in my code above. I was setting mapFrame.Background = backGround, it should be mapSurroundFrame.Background = backGround .... ...


2

The question is old but since I had a hard time finding the answer to this and ended up on this page several times, I thought I would supplement the acccepted answer a bit. I found the solution from ESRIs GeoNet: "When you create a join in ArcMap, the join results in a table that is a combination of the two tables you've joined together. This table is ...


2

You need to commit the changes you have made to the dataset, currently your code is not doing that. All you need to do is call the store method. So place after the last update and before the End If the following line: pfeature.store


2

You need to move int hdc = exporter.StartExporting(); to AFTER you have set up the frame to be exported. int hdc = exporter.StartExporting(); actView.Output(hdc, (int)exporter.Resolution, ref rectangle, null, null); exporter.FinishExporting();


2

Below is some VBA code that shows you how to open the Item Description window from the first layer in the TOC. Public Sub OpenItemDescription() ' Get Application Dim pApp As IApplication Set pApp = Application ' Get Map document Dim pMXD As IMxDocument Set pMXD = ThisDocument ' Get Map Dim pmap As IMap Set pmap = pMXD....


1

To go along with my comment. The problem you have is having to figure out a way to implement interprocess communication. Whenever you start up a python script, you're creating another process to run (python.exe) to go along with your already running process (ArcMap.exe). The problem here is that there needs to be a way to communicate back and forth. You ...


1

One problem I see (which could just be how the code was copied into the question) is the const pPath quoted string is not properly formed (needs quotes front and back.) Likely that was just a typo, and not the real source of the problem... However, the loadComboBoxOn() appears to build an image array out of a list of layer names...but I don't see where ...


1

I had a fix posted on the ESRI forum by Jeff Matson which I'll put here. Basically I shouldn't be creating a new LabelEngineLayerProperties object. I can get it by querying the AnnotateLayerPropertiesCollection. There should be no need to clear and re-add it Here is the working code: public void add_halo(IGeoFeatureLayer fl) { fl....


1

It doesn't seem that this is supported directly in the ArcObjects API. As a workaround using the save to v9.3 route could be slow, but how slow and does it actually matter? For example let's guess it added 10sec per export. That could be annoying yes, but I'd argue that being able to use dynamic text in your mxd would save you more than 10sec in the making ...


1

You definitely need the ArcObjects SDK to build addins. It's more than just referencing the libraries, the SDK installs vital templates for creating addins; when you start a new project there is an Esri category which you pick from ArcMap, ArcCatalog etc.. and the template is created with all the necessary components. You might be able to get away with ...



Only top voted, non community-wiki answers of a minimum length are eligible