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

It seem you have written an ArcEngine application. So, you must install ArcEngine Runtime on any machine you need to run your application. ArcEngine Runtime is the minimum. You can either install ArcEngine SDK or even ArcGIS Desktop to run you application. The Arc Application (Engine or Desktop), must match the version of sdk that you have built your ...


2

Assuming that we're dealing with the planar coordinate case (that is not actually what the OP suggested, but I offer this as a better answer to the one given so far – and so far, accepted, by the OP – for the planar case), it helps to first determine the direction cosines from the two clockwise bearings, βAC and βBC, from known points A ...


2

If you want code in an add-in like a button to be available when it is loaded rather than when it is clicked, in the Config.esriaddinx file add onDemand="false" to that button's xml. You can also use an Extension class to execute code during its OnStartup(). Create the extension, and in the Config.esriaddinx file, add autoLoad="true" to its xml.


1

You could have the add-in enable or disable depending on the name of the mxd by putting a boolean test in the OnUpdate() sub. If My.ArcMap.Application.Document.Title = Authorized.mxd Then Enabled = True, or something like that. You could also require a user to enter a password and have each add-in on your toolbar query the result in its OnUpdate() and then ...


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

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



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