Tag Info

Hot answers tagged

3

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. ...


3

I think the beta doc might be a little out of date. I was told to look at the factory methods. (MapFactory.Create, ItemFactory.Create, etc which will be the way to go when the SDK is released at 1.1) Try this: (note, the map is created in the projectpane, but is not automatically opened) protected override void OnClick() { var map = ...


2

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 ...


1

Ok so I managed to resolve the issue by making a change to the way I run my async method. I changed this: var results = await DockFindModel.Search(); To this: var results = await QueuedTask.Run(() => DockFindModel.Search()); Although i'm a bit confused as to why I need to await Task.Run() when relaycommand is already accepting async lambda. I'm ...


1

All formulas you might find on the web do the conversion from OSGB36 grid to lat/lon on the Airy ellipsoid, but there is no exact tranformation from that to WGS84. Simply because OSGB36 has grown over decades, including surveying errors done by our ancestors, and terrestrial moves. The only exact way to do the last step is to use the official OSGB36 datum ...


1

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 ...



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