Tag Info

Hot answers tagged

2

Yes, sort of. The problem here is you're accessing directly from the database which may or may not be aware of any edits; edit reside in a different database in your TEMP directory (Scratch Workspace) and don't make it to the real database until you save your edits (commit). You really should be searching from the table object derived from the map thusly: ...


2

It's hard to tell from your code sample what you're up to. What you're searching for is the enum esriFieldType which can be tested against each field to determine its type: MyComboBox.items.clear(); // empty first IFeatureLayer pFtLayer = (IFeatureLayer)gMap.get_Layer(0); IFeatureClass pFtClass = pFtLayer.FeatureClass; for (int Cnt = 0; Cnt < ...


2

I use this code and it works......... private void OUT(string line) { IMap Map; IMxDocument mxDocument; IApplication App = ArcMap.Application; mxDocument = (IMxDocument)(App.Document); Map = mxDocument.FocusMap; var pDelLayerLine = (IFeatureLayer)Map.get_Layer(0); ...


1

You should use the table property of IStandaloneTable to change its datasource. First create a reference to the new ITable (e.g. a table from a geodatabase), then use this code to replace the Table property: IMap map = ...; IStandaloneTableCollection tbcol= (IStandaloneTableCollection)map; for (int i = 0; i < ...


1

Check this ArcGIS sample that exactly addresses your question: Feature Template Select Dialog


1

Based on this Very old help you want to use your IStandaloneTableCollection IStandaloneTableCollection pColl = ArcMap.Document.FocusMap as IStandaloneTableCollection; IStandaloneTable pThisTable = pColl.StandaloneTable[0]; // the first table pColl.RemoveStandaloneTable(pThisTable); ArcMap.Document.UpdateContents(); //update ...


1

There is a better way to iterate through layers, look at Map.Layers(UID,True) as IEnumLayers... this limits your layer types (IFeatureLayer, IRasterLayer..) and looks in your group layers. UID pUID = new UIDClass(); pUID.Value = "{40A9E885-5533-11d0-98BE-00805F7CED21}"; // IFeatureLayers IEnumLayer pMapLayers = ArcMap.Document.FocusMap.get_Layers(pUID, ...


1

With a little modification, I got this to work. Thank you very much for your help. This is important to note that this is for feature layers only, not tables. IMap map; IMxDocument mxDocument; mxDocument = (IMxDocument)ArcMap.Application.Document; map = mxDocument.FocusMap; mxDocument.ActiveView.Refresh(); ...


1

IContentsViewSelection should work for you. http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//000v00000064000000 This is VB, but you should get the idea... Dim pCVSel As IContentsViewSelection = My.ArcMap.Document.CurrentContentsView Then: pCVSel.SelectedItems.Count will give you the count of selected items in the TOC.


1

On A Form with a split container I added a Map Control docked in one panel and a toccontrol docked the other. I set the mapcontrol to be the buddycontrol of the toccontrol. and added a mouse down event to that has the following code. This works perfectly in ArcGIS 10.2.2, the map expands and contracts and changes the extent as expected. Basically what your ...


1

I removed all the event handlers from my map control, thus effectively paring it back to the core ArcGIS functionality. The map painting issue disappeared. I then added the event handlers back in one-by-one to isolate the problem. The problem appears to be a bug in the ArcGIS control where if a map layer is inserted in the code for the OnExtentUpdated event ...



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