Tag Info

New answers tagged

1

In order to use C# with the ArcGIS Platform I recommend that you review the ArcObjects API Reference for .NET, and in particular this ArcMap Overview. Something to be aware of at the outset is that little (some annotation is one exception) or no spatial data is stored in *.mxd files. Consequently, I suspect that what you are looking to do is to access ...


0

Here is a sample since my rep is too low to post more. I created from various forums and tools to be used as a python addin buttons and arcmap 10.1. Also converts any projection to WGS 1984 so it can be used for Google, Bing, and other maps. import arcpy import pythonaddins import webbrowser import threading class YahooMaps(object): ...


2

You'll want to listen to the IDocumentEvents.NewDocument Event. There's a snippet available that shows how to wire this event.


0

The image used in the xml configuration file must have its property "build action" set to AddInContent - at least is vs2012 for arcgis 10.2.


0

This issue was caused by this line of code: IFeatureClassDescription fcDesc = new FeatureClassDescriptionClass(); I should have created that object within the ServerContext. In my code sample above I created the feature class description outside the serverContext and used it to create a feature class in a feature dataset that was created within the ...


1

This is all I need to get things going in a standalone .NET app. We have a floating license server rather than individual licenses though, I'm not sure if that matters: if (ESRI.ArcGIS.RuntimeManager.ActiveRuntime == null) ESRI.ArcGIS.RuntimeManager.BindLicense(ESRI.ArcGIS.ProductCode.EngineOrDesktop);


0

I think this may be a Question best posed to Esri's software developers via your local Esri support. If you would expect from its documentation that it should work silently via a \s switch then it would seem that there is either a bug, or that a documentation fix/enhancement may be in order.


0

Why VS2012 is not hitting break points ? a) I ran ArcGIS code Migration Analyzer from Tools Menu in Visual studio 2012. This pointed list of issues like some dll like ESRI.ArcGIS.Geoprocessing specific version set to false. b) Project build property set to "Any CPU" Why tool is not added to tool box a)Need to explicitly register the dll by right click ...


0

I solved my problem. The entire flow of my code was executed within one servercontext. I suppose therefore some references to the table were not released sufficiently however I always released the FeatureCursors and Workspaces when not longer needed. I solved my problem by creating and releasing different servercontexts for different parts of my code. ...


2

Have a look at this thread. There is a VBA sample showing you how to set the display format. It looks like you are wanting to combine 2 different display formats, is this correct? You may need to have a play around with the ICustomNumberFormat interface but I have not done this, so may be a "red herring"?


-1

Chaz & Kirk - I was unable to get the geoFeatureLayer.FeatureClass = relQueryTable as IFeatureClass; to work. I had to resort to creating a new FeatureLayer and removing the one originally added. it's a decent solution for now but if either of you could provide a little more insight on what you've done I would appreciate it.


1

I finally worked through this issue with Esri Support. The answer is No, there doesn't exist an out-of-the-box way to create connection files for SQL Workspaces. The suggested workaround is to create and use the SDE workspace file, as in Jason's answer, and updating ArcObject code to read the connection properties off the SDE Workspace and opening the SQL ...


0

Thanks for both answers. Ken's hint on language issues regarding WorkspaceCategory was great, though the GetCategory function did not fit my particular need, as my goal was to use full path name (not the IWorskpace) to recognize the appropriate WorkspaceFactory, i.e.: "C:\Project\fclass" -> shapefile in a folder -> "C:\Project.gdb\fclass" -> feature ...


2

Cast the layout to IGraphicsContainer and call IGraphicsContainer.FindFrame, passing the map surround as its argument. The returned frame is an IElement instance.


2

This is a function I use to get the type of workspace. This has the benefit of working correctly when the code is being used on computer set to a different language. A problem I ran into when using FinalLocation was it returns the name in the local language. Public Function GetCategory(ByVal pWorkspace As ESRI.ArcGIS.Geodatabase.IWorkspace) As String ...


3

The GPUtilities class provides all sorts of methods useful when dealing with paths and dataset information. Your goal can be achieved in many ways such leveraging light-weight name objects: Sub WorkspaceFactoryForPath() Dim pGPUtilities As IGPUtilities Dim pName As IName Dim pWorkspaceName As IWorkspaceName Dim sCatalogPath As String ...


0

It turns out I was adding the wrong kind of extension. Correct Way right click on project -> add -> new item, select ArcGis -> desktop Addins -> Addin Component -> extension. Wrong Way right click on project -> add -> new item, select ArcGis -> extending Arc Objects -> application extension. This was not obvious from anything i had read



Top 50 recent answers are included