POST
|
It's probably a IMultiLayerLineSymbol if you set it through the UI. If it is, you'll need to loop through the layers in the symbol to find the one you're looking for.
... View more
04-25-2014
12:34 PM
|
0
|
0
|
375
|
POST
|
So, your tool is part of a larger set and you want to replace it with a newer version that will be installed separately? One solution would be to remove the tool's entry in the ESRI Mx Commands component category. You would do this in your new tool's installer. However, I'm not sure exactly how that would affect things. Are your tools on a toolbar that you define via IToolbarDef? If so, you could write an extension that installs along with your new tool. Wire the extension to listen for the NewDocument and OpenDocument events. Inside these events, get a reference to the toolbar, remove the old tool and add your new tool.
... View more
04-21-2014
11:47 AM
|
0
|
0
|
130
|
POST
|
As I said, I don't believe there is an ArcObjects method for doing this. It's just math though. A quick Google search should link you to an answer.
... View more
04-17-2014
05:03 AM
|
0
|
0
|
240
|
POST
|
I don't believe there is a way through ArcObjects to do a 3D hit test but if you just want to get the distance between two geometries you can use IProximityOperator3D.
... View more
04-16-2014
06:52 AM
|
0
|
0
|
240
|
POST
|
Are you setting the output spatial reference on your spatial filter? If not, you'll get unexpected results if the spatial reference of your query geometry is different than the spatial reference of the features you are querying against. Also, isn't the spatial relationship you're looking for the same as "crosses"? If so, I would just set the spatial relationship property to esriSpatialRelCrosses and not use a custom filter. esriSpatialRelCrosses Returns a feature if the intersection of the interiors of the two shapes is not empty and has a lower dimension than the maximum dimension of the two shapes. Two lines that share an endpoint in common do not cross. Valid for Line/Line, Line/Area, Multi-point/Area, and Multi-point/Line shape type combinations.
... View more
04-10-2014
06:56 AM
|
0
|
0
|
323
|
POST
|
Call IMap.SelectByShape. It will query all feature layers in the map using the geometry you give it.
... View more
04-08-2014
04:58 AM
|
0
|
0
|
533
|
POST
|
Unless something's changed, Engine ships with a toolbar control that you can drop onto a form. In it's property pages you can pick what you want to go on the toolbar. To add your own custom commands and tools you implement ICommand and/or ITool and register the class in the map control's component categories. After that, you can pick them through the property pages just like a builtin command or tool. When deploying the app, you'll need to register those custom commands and tools on the user's machine in order for them to be available.
... View more
04-03-2014
01:14 PM
|
0
|
0
|
441
|
POST
|
Usually what is happening when someone asks this question is they are not rewiring the events when the document changes or they are not rewiring the events correctly. When the document changes, you should unwire all event listeners that were added using the previous document and then rewire those event handlers using the new document. If you don't, then your event handlers are still listening to the previous document's events and will cease to fire since that document is no longer the current document. Here's an example of how to do it correctly: Declarations Private m_documentEvents As IDocumentEvents_Event Private m_activeViewEvents As IActiveViewEvents_Event Extension Startup routine where events are initially wired Dim mxDocument As IMxDocument = DirectCast(ESRIContainer.Instance.Application.Document, IMxDocument) m_documentEvents = DirectCast(mxDocument, IDocumentEvents_Event) m_activeViewEvents = DirectCast(mxDocument.FocusMap, IActiveViewEvents_Event) AddHandler m_documentEvents.NewDocument, AddressOf NewDocument AddHandler m_documentEvents.OpenDocument, AddressOf OpenDocument AddHandler m_activeViewEvents.ItemAdded, AddressOf ItemAdded AddHandler m_activeViewEvents.ItemDeleted, AddressOf ItemDeleted Events are unwired then rewired inside the NewDocument and OpenDocument event handlers Private Sub NewDocument() RemoveHandler m_activeViewEvents.ItemAdded, AddressOf ItemAdded RemoveHandler m_activeViewEvents.ItemDeleted, AddressOf ItemDeleted Dim mxDocument As IMxDocument = DirectCast(ESRIContainer.Instance.Application.Document, IMxDocument) m_activeViewEvents = DirectCast(mxDocument.FocusMap, IActiveViewEvents_Event) AddHandler m_activeViewEvents.ItemAdded, AddressOf ItemAdded AddHandler m_activeViewEvents.ItemDeleted, AddressOf ItemDeleted LoadOutputMapItems() End Sub Private Sub OpenDocument() RemoveHandler m_activeViewEvents.ItemAdded, AddressOf ItemAdded RemoveHandler m_activeViewEvents.ItemDeleted, AddressOf ItemDeleted Dim mxDocument As IMxDocument = DirectCast(ESRIContainer.Instance.Application.Document, IMxDocument) m_activeViewEvents = DirectCast(mxDocument.FocusMap, IActiveViewEvents_Event) AddHandler m_activeViewEvents.ItemAdded, AddressOf ItemAdded AddHandler m_activeViewEvents.ItemDeleted, AddressOf ItemDeleted LoadOutputMapItems() End Sub I didn't include the code for the ItemAdded and ItemDeleted event handlers since it's not important, but these would be the events in my example that would stop firing if I didn't rewire them. Also, technically the extension's Shutdown routine should do a final unwiring of the events but it really doesn't matter since ArcMap is closing at that point. One important thing to note is that the IMxDocument reference is taken from the IApplication reference each time it is needed. If you set a global document reference then you run the risk of it also pointing to the previous document and not the document currently loaded. In my example, I'm using a singleton object class that we use in all of our applications that handles this but you can use the application hook passed to your extension just as easily.
... View more
04-01-2014
11:25 AM
|
0
|
0
|
349
|
POST
|
What the document is saying is that there is no Engine equivalent to an ArcINFO license. Therefore, if you want to use functionality in your application that requires an INFO license then you MUST check out an ArcGIS Desktop ArcINFO license as there is no ArcGIS Engine license that will be sufficient. In your code, you are binding to the Engine product: Dim EngineAvailable As Boolean = RuntimeManager.Bind(ProductCode.Engine) Since your code requires an INFO license and there is no Engine equivalent to that license level, I would imagine you need to bind to the Desktop product. Your application will require the user to have an INFO licensed installation of ArcGIS Desktop installed in order to run your application. They will not need any Engine product or license.
... View more
03-27-2014
05:07 AM
|
0
|
0
|
586
|
POST
|
How are you changing the data source? Since you're updating the data connection while the document is open, I would do this by calling IDataLayer2.Disconnect first. Then call IDataLayer2.Connect to restore the connection. You might also try calling IApplication.SaveDocument after updating the data source.
... View more
03-26-2014
09:27 AM
|
0
|
0
|
379
|
POST
|
If you removed the Engine license checkout and it still doesn't work then that indicates a problem with your ArcINFO license. What version of ArcGIS are you programming against? What version of ArcMap is installed on the machine you're running this code on? When you put a breakpoint in your license checkout code and step through it with the debugger, what result is returned from the license checkout call? Are you testing on the same machine you're using for development or do you have a separate test machine?
... View more
03-25-2014
05:00 AM
|
0
|
0
|
586
|
POST
|
I do not work with Engine applications anymore so I am unfamiliar with how the licensing works now. The way that it used to work is it would try checking out the licenses you specified in the order you specified them until a checkout was successful. At that point it would quit checking out licenses. You are specifying the Engine license first, so perhaps it's stopping once that license is checked out. If you have ArcGIS Desktop on the machine, then you don't need the Engine license at all so for a test you could remove the Engine license from the checkout routine and just check out the ArcINFO license. If that works then it indicates the checkout process was stopping at the Engine license. If it fails, then that indicates there is a problem checking out the ArcINFO license.
... View more
03-24-2014
07:54 AM
|
0
|
0
|
586
|
POST
|
Hi all. I'm developing a standalone application with ArcGIS Engine in .Net environment. I have license for engine + Spatial analyst + 3D Analyst. Everything works perfect �?? including clip, intersect, Select by attributes, Select By Location, �?�. �?? except for Eliminate tool. This is my code for eliminate:
Dim InLayerPath, InLayerName As String
Dim pFDS As IDataset = pFL
InLayerPath = pFDS.Workspace.PathName
InLayerName = pFDS.Name
Dim GP As ESRI.ArcGIS.Geoprocessor.Geoprocessor = New ESRI.ArcGIS.Geoprocessor.Geoprocessor
Dim EliminateTool As New ESRI.ArcGIS.DataManagementTools.Eliminate
EliminateTool.in_features = InLayerPath & "\" & InLayerName & ".shp" 'like c:\a.shp
EliminateTool.out_feature_class = OutFullPath 'input by user like c:\b.shp
Dim pGPResult As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult
GP.OverwriteOutput = True
pGPResult = GP.Execute(EliminateTool, Nothing) In the last line, I get HResult error of 2147467259. GP.GetMessages(2) gives me following description of this error: "Failed to execute. Parameters are not valid. ERROR 000824: The tool is not licensed. Failed to execute (Eliminate). " I'm nearly sure that that there is no problem with license, because in other areas of my code I can run other tools located in DataManagementTools toolbox, like select by location. I've spent lots of hours to figure out the source of problem but without any solution. Any help or tip would be greatly appreciated Thanks in advance Here is the Help topic for the Eliminate tool: http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000005p000000 At the very bottom, it states that an Advanced license is needed to run the tool.
... View more
03-24-2014
05:20 AM
|
0
|
0
|
586
|
Title | Kudos | Posted |
---|---|---|
1 | 06-20-2014 05:29 AM | |
1 | 02-01-2011 04:18 AM | |
1 | 02-04-2011 04:15 AM | |
1 | 01-17-2014 03:57 AM | |
1 | 10-07-2010 07:37 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|