Tag Info

New answers tagged

0

The problem was somehow the target CPU of the project had changed. If you go to project properties and then compile there are 2 places where the target platform is set. On the first line there is a dropdown for "Platform". This was correctly set to x86. But 4 rows down there is another drop down for "Target CPU". This was set to x64 somehow. Once I changed ...


3

Below is some code in VBA that shows how to set the extent of the viewer window to the current map. The key interface is IMapInsetWindow which gives you access to the IMapInset2 and it's read/write properties. Public Sub updateMapView() ' Get map document Dim pMXDoc As IMxDocument Set pMXDoc = ThisDocument ' Get Map Dim pMap As IMap ...


1

I believe what you're looking for can be for found in the SDE_XML_DOC# tables stored as ArcSDE XML (CLOB in Oracle in this case). Here's an example of the workflow for a feature class called "SDE.Test": SELECT NAME, DEFINITION, DOCUMENTATION FROM SDE.GDB_ITEMS WHERE NAME = 'SDE.Test'; NAME DEFINITION DOCUMENTATION SDE.Test 61 ...


0

I have same problem, I also did everything that you did - nothing works. Thank you for your research, I just installed VS2012 and it works fine, good enough for now. If you ever will find the solution - please write it here)


1

These are the steps I followed multiple times to get addins working in versions of visual studio other than 2010, using the 10.2.2 arcobjects sdk. My guess is this would probably work with 10.1 as well. Install the version of visual studio you wish to use Install visual studio 2010 and ArcMap 10.2.2 (requirements for arcobjects 10.2.2) Install ArcObjects ...


0

I just wanted to post my final working code: '--Check For Point Layer In Editing If Not map Is Nothing Then '--Loop through all of the map layers to find the desired one Dim enumLayer As IEnumLayer = map.Layers(Nothing, True) enumLayer.Reset() Dim currentLayer As ILayer = enumLayer.Next() Do Until currentLayer Is Nothing If ...


1

Per @blah238 suggustion, This python code lists all Relashionship classes within a geodatabase and put them in a unique list (relClasses): inGDB = r"D:\mygeodatabase.gdb" env.workspace = inGDB #################Getting all Tables and Feature Classes########### fcs = [] #root of workspace for item in arcpy.ListFeatureClasses("*"): fcs.append(item) for item ...


2

To find the name of the dataset as stored in the database use IDataset.BrowseName. IDataset.Name will give you the layer name as it is named in ArcMap. You should also test that the layer can be cast to IDataset: If TypeOf currentLayer Is IDataset Then... Things like group layers don't implement IDataset, and will cause an error.


1

Custom snap agents only apply to the classic snapping environment. You can choose the snapping environment through the editor options dialog or by setting the IEditProperties4.ClassicSnapping property.


2

These types of questions almost invariably get closed as "primarily opinion-based", but I will say that it's going to be much more difficult and take much more time to learn ArcObjects than Runtime, especially when you take into consideration that in either case you will also have to learn a new programming language and framework (e.g. C# and .NET). ...


0

In Visual Studio, Go in your project properties and go to the tab Debug. Make sure that in the section "Start Action", the radio button "Start External Program" is checked and that you put the map to your ArcMap execution file. In my case: "C:\Program Files (x86)\ArcGIS\Desktop10.3\bin\ArcMap.exe" Hope this helps. Fabien


2

Your code won't work. You loop the cursor until it finishes. At that point pFeature is Nothing. After that you try to access the OID value of pFeature, which is Nothing. If you only select a single building or only want the first building OID of any selection set don't loop the cursor, just get rid of the cursor loop. Then you should make sure you got ...


1

I think SDE_OBJECT_ID might be data type LONG. Have you tried pFeature.OID.ToString(), or whatever the conversion method in VBA is? Not sure if it might fix the issue. Just an idea.


0

I had a similar issue and I have solved it using devenv.exe instead of msbuild.exe as described in Building ArcMap’s Add-in using command line



Top 50 recent answers are included