Tag Info

Hot answers tagged

5

You must write an ArcMap Addin Extension. In the extension, listen to DocumentOpened event and from there, show your form. Useful Link To create the extension, use Arcgis visual studio template. Then change SetupEvents method like this: private void SetupEvents() { m_docEvents = ArcMap.Document as IDocumentEvents_Event; ...


3

The way I have done this in the past is to put the code to close the window in the close document event. So you need to set up a document event handler to catch the close document event: Private m_CloseDocument Private Sub DocumentEventsHandler(ByVal doc As IMxDocument) If doc is Nothing Then Return End If Dim documentEvents = ...


2

You must release the cursor after each usage. Just add these lines at the end of your codes: System.Runtime.InteropServices.Marshal.ReleaseComObject(featureCursor2); featureCursor2 = null; And add a reference to ESRI.ArcGIS.ADF.Local assembly.


1

Assuming your project is setup correctly, with all references added and compiles without errors. Using Visual Studio Express 2013, ArcGIS 10.3 and targeting .Net framework 3.5 Also ensure you add ArcObjects Library References to: DataSourcesGDB GeoDatabase Carto Public Sub New() On Error GoTo Trap Dim sPathFGDB As String Dim sFCName As String ...


1

If you ArcObjects version is 10, then the maximum version of Visual Studio that supports ArcObjects SDK, is Version 2010. Please refer to this page. Therefore, you should either downgrade your Visual Studio version to 2010 or upgrade your ArcGIS Version to version 10.2.x Reference The only supported version of .NET framework that works with ArcObject ...


1

You can find and delete the Addins for ESRI at this location. C:\Users\yourusername\Documents\ArcGIS\AddIns. You also need to have your ESRI product closed when installing or reinstalling addins.


1

The IScreenDisplay interface has a ScaleContents property; set it to True and the old behavior is back. My.ArcMap.Document.ActiveView.ScreenDisplay.ScaleContents = True This works as a button click event in ArcMap, though I'll probably create an extension that the user can enable or disable. Hopefully it will also work in your application.


1

You should use IDataSourceHelperLayer Interface: Code Snippet: IDataSourceHelperLayer dsh = new DataSourceHelper() as IDataSourceHelperLayer; dsh.ReplaceName(pLayer, newIName, false); You can either use IDataSourceHelperLayer.FindAndReplaceWorkspaceNamePath method.


1

In ArcMap the MosaicDataset is a MosaicLayer and is essentially a CompositeLayer, and the actual raster image is one of its components. So find the raster in the MosaicLayer and treat it exactly as you did the raster in your first example... Dim pEnumLayer As IEnumLayer = My.ArcMap.Document.FocusMap.Layers(Nothing, True) pEnumLayer.Reset() Dim pLayer As ...


1

Not sure why the question got "voted down". Thanks for the constructive input. Anywho, for those that understood the question, or are facing a similar challenge, here is/are the solution/s that was/were reached, tested, and proven to work. Summary It was the connection property parameter names. DB_CONNECTION_PROPERTIES vs. ...


1

You'll need to install the ArcObjects SDK to work with your enterprise geodatabases. If you have ArcGIS, the SDK is available to you as a separate install. You can find it either on your installation DVD (if you have one) or for download from the customer service site. Please see the links below for more info. ...


1

That works Farid Cher, but another helpful tip is to use the autoLoad property in the Config.esriaddinx: <Extensions> <Extension id="Microsoft_OnSave_Extension1" class="Extension1" productName="OnSaveExt" showInExtensionDialog="true" autoLoad="true" /> </Extensions> This may not be there by default but it is safe to add, it forces ...


1

So I ended up contacting Esri support about this... This can be worked around by wiring up the ItemDeleted event to the PageLayout. Then the ItemDeleted event will be fired whenever a map is deleted. This gets me what I want: Imports ESRI.ArcGIS.Carto Imports ESRI.ArcGIS.ArcMapUI Public Class test_FocusMapChanged Inherits ...


1

It looks like you have to call ISelectionEvents.SelectionChanged() to update this window. Put this after your selection is made, and it should work: Dim pSelectionEvents As ISelectionEvents = My.ArcMap.Document.FocusMap pSelectionEvents.SelectionChanged()


1

But is it possible to get the current IApplication in order to set the current document? If you can't get a reference to the application object, may be you can instantiate a new AppRef object IApplication baseApp = (IApplication)Activator.CreateInstance(Type.GetTypeFromProgID("esriFramework.AppRef")); ...


1

You can not customize this dialog. However you can simply create custom FeatureTempalate dialogs. To do so, download this sample project Feature Template Select Dialog A similar question has been already answered: Getting FeatureTemplate dialog form ArcObjects?



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