Tag Info

New answers tagged

0

Below is what I came up with - suggestions for making this better are welcomed: /// <summary> /// Gets the field value from the IObject. Checks for coded /// value domains, subtypes, or just the plain field value. /// </summary> /// <param name="obj">ESRI IObject</param> /// <param ...


0

Use a try catch to fetch error messages from the gp object. try { GP.Execute("Creation", parameters, null); } catch(exception ex) { Messagebox.Show(GP.GetMessages(<severity>)); }


1

Further to Dan's answer on enumerating layers... with the UID.Value of IRasterLayer (see example UIDs here) supplied to the get_layers function you don't need to check later that it is a raster layer you're playing with, however sometimes you need to use the UID for IDataLayer which will return feature layers and raster layers, so to check this use: if ...


2

The easiest way to loop through layers in ArcMap is to use IEnumLayer. You get a reference to that from IMap.Layers. http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//001200000482000000 Then check the type and cast each raster layer returned by the enumerator to IRasterLayer. ...


0

Simply get the activeview envelope and CenterAt() the point shape you want var point = (IPoint)myItem.Shape; var envelope = theActiveView.Extent; envelope.CenterAt(point); theActiveView.Extent = envelope; theActiveView.Refresh(); That's it !


0

Here is something that might point you in the right direction: DataSize = nRows * nCols; byte[] buff = new byte[DataSize]; // THIS IS WHERE THE DATA WILL BE ThisBand.ReadRaster(cOff, rOff, nCols, nRows , buff , nCols, nRows , 0, 0); cOff and rOff are the offsets from the upper right cell in cell coordinates. nCols and nRows need to be specified twice, ...


3

Yes there is (in fact you have a choice of a property or an event to hook into): The IApplicationStatus.Initialized property changes once the application is fully initialized, and the IApplicationStatusEvents.Initialized event fires as well. It is suggested that UI changes from Add-ins only occur after application initialization, so this is just the hook ...


2

Changing text fields length needs an exclusive schema lock on the dataset. Exclusive schema locks—In contrast to shared schema locks, exclusive schema locks are controlled by the developer or ArcGIS application, such as ArcMap or ArcCatalog. An exclusive lock is used to lock a geodatabase dataset or object from use by others to make the necessary ...


3

Arcobjects has two interfaces to join multiple FeatureClasses and (or) Tables: Query tables (IQueryDef) RelQueryTables The result of your join can be added to the map as a Layer if the result has a geometry column. Make sure to read this Page to check the differences of two and select the one that suites your needs


1

To expand on the comment by @Dan Jurgella... Don't forget to check the properties in the System.Globalization.CultureInfo class. There are static properties in that class, DefaultThreadCurrentCultureand DefaultThreadCurrentUICulture, which could help you. Also depending on what you're doing with languages, it probably wouldn't hurt to be familiar with the ...


3

Looks like this is what you are looking for: http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//0048000001s1000000 System.Threading.Thread.CurrentThread.CurrentUICulture


1

Ok, I got it to work by going hog-wild with ComReleaser objects. Basically, I scanned through my code, and anytime I found anything that was at all from ArcObjects, I attached a ComReleaser to manage it. Basically, I'm just doing manual memory management. At any rate, it does seem to release the file, so long as EVERYTHING is released (even if it doesn't ...


0

I made it work with changing the encoding to ISO-8859-1 byte[] buffer = Encoding.GetEncoding("ISO-8859-1").GetBytes(sldDocument.ToString()); Not sure why but it works..


0

Loading and displaying GeoJSON with Leaflet has been pretty well detailed here: http://leafletjs.com/examples/geojson.html



Top 50 recent answers are included