Hot answers tagged

6

Take a look at the following: Esri Migration doc Specifically Reference ESRI.ArcGIS.ADF.Local assembly Set ESRI assemblies Specific Version property Platform CPU target changes


6

It appears you have a setup project that is part of your solution. You might try having it run EsriRegasm, as described in Chris Garrard's blog post. When you build your project you'll also need to call EsriRegasm, as described here. <Target Name="BeforeClean"> <Exec WorkingDirectory="$(CommonProgramFiles)\ArcGIS\bin" ...


6

I did not per se figure it out becuase i don't really understand what is going on here but I was trying different things until it worked. I am not sure whether it is suppose to work or whether this crudity can even be called a workaround but here it goes: Keep both "ESRI.ArcGIS.AddIns.targets" and "ESRI.ArcGIS.AddIns.11.targets" in the "C:\Program Files ...


5

I think VS2010 only works if you point it at the .NET 3.5 framework, not the 4.0. Kind of makes 2010 redundant imo. I don't think it will work properly Arc 10 (sp1) VS2010, VS 2008 and VS Express 2008 - all 3.5 Framework. with ArcGIS 10.1 - 4.00 framework and VS2010 So: VS2010 if you use the .net 3.5 framework. Standard and Professional work. VS2010 ...


5

In addition to @jmhauck answer; because the application framework has changed in version 10 you might also consider just to build a new extension using the ArcGIS 10 SDK using one of the "Extending ArcObjects" templates and copy your functions and procedures from your legacy extension. More info on extending ArcObjects here


5

You can use the start external program option by editing the VS project user file, which will be named {yourproject}.vbproj.user in the projects directory. Open the file using your favourite xml editor and look for the following line: <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "/> replace it with something like ...


5

Yes, since you are presumably using VB.NET (not VB, which is 20+ years old and no longer supported), you need to use the Imports statement to import namespaces. Specifically you want to put Imports ESRI.ArcGIS.Geometry at the top of your code files. Alternatively you could fully qualify the IPoint type every time you use it (ESRI.ArcGIS.Geometry.IPoint) ...


5

I got this book 2 weeks ago while browsing (again) for books covering your same question. Definitely worth purchasing. It's taken me a while to understand interface programming (that ArcObjects uses) but this guy explains it pretty well in Chapter 5. Lots of sample code and examples on how to create add-in's and extensions. The book covers 10.1 as well. ...


4

This is an free tool that connects Bing Maps and Sql Server spatial. http://ajaxmapdataconnector.codeplex.com/ Keith


4

Instead of checking for a selection directly in the button's OnUpdate routine, which runs very frequently, I would write an extension that uses event handlers to respond to selection events and caches the selection state of your layer, and then in the OnUpdate routine check the extension's cached state. Of course this is probably overkill if there is only ...


4

You need a function that returns the selection set count property on your layer. If the count is >0 than you can enable your button. ISelectionSet.Count Property


4

The syntax for combobox (as well as other controls) is different in VB.NET. You should review the help to see the changes. cmbBox.ListCount --> cmbBox.Items.Count cmbBox.List(l) --> cmbBox.Items.Item(l) cmbBox.AddItem(sItem, l) --> cmbBox.Items.Insert(l, sItem) cmbBox.AddItem(sItem) --> cmbBox.Items.Add(sItem)


4

Here are two examples of getting values from the selected features. This one lists all the values for the feature IMxDocument pMxDocument = ArcMap.Application.Document as IMxDocument; IMap pMap = pMxDocument.FocusMap; ILayer pLayer = pMap.get_Layer(0); IFeatureLayer pFeatureLayer = (IFeatureLayer)pLayer; IFeatureClass pFeatureClass = ...


4

If you really need as assembly to have it's own config you directly load it using this .net code. System.Configuration.ExeConfigurationFileMap fileMap = new System.Configuration.ExeConfigurationFileMap(); fileMap.ExeConfigFilename = "THE PATH TO THE CONFIG"; System.Configuration.Configuration cfg = ...


4

It seem you have written an ArcEngine application. So, you must install ArcEngine Runtime on any machine you need to run your application. ArcEngine Runtime is the minimum. You can either install ArcEngine SDK or even ArcGIS Desktop to run you application. The Arc Application (Engine or Desktop), must match the version of sdk that you have built your ...


4

In order to debug ArcMap 10.3 Add-in with VS2013 in .Net 4.5. I had to attach VS2013 to ArcMap.exe process. This is kinda annoying but it is the only way I got it to work for now. I'm still confused on why this is happening. How to attach process Start ArcMap In VS2013, go to menu "DEBUG" -> "Attach to Process" Select "ArcMap.exe" and click on "Attach" ...


3

(Months later...) The answer is to not reference 3rd party dependencies if they aren't on the clients' machines and you aren't distributing them with your add-in. In this case it was the Visual Basic Power Packs dependency, which from the sounds of it wasn't being used anyways. You should also be sure to implement error handling at all entry points to your ...


3

ByRef and ICursor are underlined. ByRef = Expression expected and ICursor error = ICursor is a type and cannot be used as an expression. When you have the keyword ByRef you can ONLY have a variable following it. What you have following it is a function. ByRef means that the variable you are giving to the function you expect to change in the ...


3

So here is how I successfully solved the issue -- although I did go through every one of the settings for the x86 again -- I removed EVERY reference to the ArcObject interfaces and re-added them to the project. I also, removed and re-added my Unit Test project. In doing this, I was able to catch one of the x86 references that I could have missed the ...


3

The code below works for me. using System; using System.Text; using System.Net; using Newtonsoft.Json; using System.IO; using Newtonsoft.Json.Linq; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { try { string baseUrl = ...


3

I believe your command line should read: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe C:\Temp\Mydll.dll /tlb:Mytlb.tlb /codebase Not directly related to your problem, but I would also advise against naming the type library file differently than the DLL as it violates the standard naming convention. I.e. use Mydll.tlb instead of Mytlb.tlb.


3

If this is an Add-in, you'll have to make a modification to the config.esriaddinx file also. Take a look at the section about Delay Loading in the add-in concepts help, where it says to set the onDemand attribute to false. The line will look something like this: <Button id="YourAddIn_Button1" class="Button1" message="Add-in command generated by Visual ...


3

When you set up a reference to an assembly, you have the option for "Specific Version". When you add a reference manually, by default it is True. The references added by Esri's SDK tools set it to False. You should be able to highlight multiple references in the Solution Explorer and change multiple assembly references' Specific Version to False. (At ...


3

If you are creating an extension that is only accessed from say desktop then consider developing an AddIn extension as these are much easier to deploy on client machines. If you are creating an extension that makes ArcMap talk to say MS Access then a standard extension (COM) would be required but then you have to register it with the OS and deal with admin ...


3

I use following code snippet to get selected features from map for a specific feature layer: public List<IFeature> GetSelectedFeatures(IFeatureLayer featureLayer) { IFeatureSelection featureSelection = (IFeatureSelection)featureLayer; var selectionSet = featureSelection.SelectionSet; IFeatureClass featureClass = featureLayer.FeatureClass; ...


3

ogrinfo as nothing to do with Visual Studio. It is a command line tool (Windows, Linux, Mac OS X) So you use it in the Windows console or in the Linux and Mac OS X shell in the same way. ogrinfo yourshape.shp with a lot of options: (ogrinfo) And, there are many, many tutorials in Gis.StackExchange : search ogrinfo and on the Web....


3

The latest supported version is VS Express 2010. http://resources.arcgis.com/en/help/system-requirements/10.2/index.html#//01510000006n000000


3

First, I check that Microsoft.VisualStudio.Shell.9.0 was in the GAC, It was not there... :( then I proceed as Juho Vainio in Geonet suggest : Visual Studio Command Prompt --> Run as Administrator --> gacutil /i Microsoft.VisualStudio.Shell.9.0.dll, but it failed because I was not giving the full pat of the dll, so I search for it in the Visual Studio 2008 ...


3

Here's an additional answer since I just went through this process with ArcGIS 10.3 and Visual Studio 2015. I'll just paste the reply I posted at https://geonet.esri.com/message/579779#579779. There are several steps, but none of them are too difficult. First, to get the SDK installed, you need to add a few registry keys so that ArcGIS thinks that you have ...


3

Using scipy and numpy: import numpy as np from scipy.spatial import Delaunay #do triangulation points = np.random.rand(4, 3) tri = Delaunay(points) #indices tri.simplices #points tri.points See the documentation here.



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