Tag Info

New answers tagged

1

Presuming that you mean a feature selection (select by location) and not a geoprocessing intersect then I think you want ISpatialFilter. This allows the same actions as SelectLayerByLocation including overlap type options and attribute queries.


1

The OnMouseUp event is only fired when you click somehere on the map. If you click on your dialog, or anywhere outside the map, the event won't fire. If you're clicking on the map, and try to fire an event on a (non modal) dialog, then you can follow SeaJunk's idea. On your tool, Implement an interface with a function that allows you to pass a reference ...


1

I found this thread in the old esri forums. There are several suggestions.


0

Rather than thinking about merging A/B and trying to avoid merging A/E, merge them all together into a single lake polygon (I'm hoping here your data model does at least include a unique code for the lakes) with ST_Union. Then, use ST_DumpRings() to get just the rings. Then add the skeleton lines for just that lake to the collection. Then use ST_Polygonize() ...


0

In Refresh method just call ObjectRefreshed(...) on the IGxCatalog object that you got with the Attach method. private IGxCatalog _catalog; // ... public void Attach(..., IGxCatalog pCatalog) { // ... _catalog = pCatalog; // ... } // ... public void Refresh() { // ... _catalog.ObjectRefreshed(this); // ... }


2

For a tool, you should be inheriting from BaseTool. If you have developed the tool as a COM object, rather than an add-in, you can pass a reference from the form to the tool via a property or variable on the tool. In the tools OnMouseUp event you can then do what you want to the form through the reference.


1

My first idea was to override your tools OnMouseUp() method and fire an event that you listen for in your form but that might not work (never tried this) The safer way might be to use a windows hook. These are low-level mechanisms to intercept events. You can read more on the windows help page "Hooks Overview". I'd use WH_MOUSE_LL in your case.


2

Relational database software generally permits multiple tables with the same name if they are: Owned by different users, or Placed in different databases (for RDBMSes which support multiple containers within an instance) The usual way to distinguish which table is being referenced is by prefixing it with the owner name (and a period separator). The ...


0

It may be best for you to change your project architecture to an ESRI Add-In. That way you will avoid dealing with the Windows Installer that, if I understand your architecture correctly is dealing with the windows registry. Add-Ins are much more straight forward, don't require windows specific installers, they are just shipped as a special .zip file that ...


0

Unfortunately StackExchange broke my account causing me to not be able to comment on answers etc. This is for Kirk Kuykendall, I appreciate your assistance with this very much. It's great to have people like you to come to when things just don't work right. I am excited to try the solution from the PRJ file, however, I will need to come up with some way to ...


1

Here's some revised code that I tested successfully: x -165.997618623476, y 72.0016465340226 Here's the prj file contents: ...


0

Set the ArcGIS references in your project to use the following properties: Copy Local = False Specific Version = False In most cases this will make your program forward compatible assuming you aren't using any arcobjects that were deprecated or have breaking changes.


0

This is how I've done it previously (freqently) and had no problems whatsoever: int NAD27_UTMzone4N = 26704; //http://spatialreference.org/ref/epsg/nad27-utm-zone-4n/ int NAD27_Geograpic = 4267; //http://spatialreference.org/ref/epsg/nad27/ ISpatialReferenceFactory2 srFactory = new SpatialReferenceEnvironmentClass(); ISpatialReference ProjectedSR = ...


-2

I think this post may help you http://www.arceyessoft.com/bbs/thread-14-1-1.html


0

Well i've just found a solution, I create an IFeatureCursor and an IFeature and called IFeatureLayer.Search() to get the IFeatureCursor then called ICursor.NextFeature() to get the IFeature then set the Map.Extent to IFeature.Extent and it did work :) private void list_commune_SelectedIndexChanged(object sender, EventArgs e) { if(table_commune==null) ...


0

after a bit of work with a fellow geo programmer we found a workaround to this new ESRI issue. Where we are creating and instance and casting it to IApplication, we now set the IApplication to this: /// <summary> /// This replaces the broken ESRI process of Activator.CreateInstance for AppRef /// </summary> /// ...


0

You can also use the GeoProcessor to add a field. Function AddField(ByVal TableName As Object, ByVal FieldName As String, ByVal Type As String, Optional ByVal Precision As Integer = 0, Optional ByVal Scale As Integer = 0, Optional ByVal Length As Integer = 0) As Boolean Dim NewField As ESRI.ArcGIS.DataManagementTools.AddField = New ...


0

Adding a field directly in ArcMap may not work if the feature class is included in your mxd. Usually, before modifying a feature class schema(such as adding a field), you should acquire an exclusive schema lock, to ensure that the feature class is opened only by your code. Here's an example acquiring a schema lock // Try to acquire an exclusive schema ...


1

You could use the Geoprocessor to execute the "CreateEnterpriseGeodatabase" tool. http://resources.arcgis.com/en/help/main/10.2/index.html#//001700000162000000 IGeoProcessor2 gp = new GeoProcessorClass(); IVariantArray parameters = new VarArrayClass(); try { parameters.Add(@"SQL_SERVER"); parameters.Add(@"hostname\instancename"); ...


0

IFeatureClass.AddField expects a field object, in this case you are providing a IFieldEdit object - thus the type mismatch and error. Try it this way: public IMxDocument mxDoc; public IMap map; IField NewField = new FieldClass(); IFieldEdit2 field = (IFieldEdit2)NewField; field.Name_2 = "Parcel_Way"; field.Type_2 = ...


0

After doing more research i was able to fix the issue by allowing ComReleaser to manage the lifetime of my IDatabaseCompact object. For ArcObjects 10.1, the ComReleaser is in the ESRI.ArcGIS.ADF.Local.dll This is the Resulting code: Using comReleaser As ComReleaser = New ComReleaser() Dim dbCompact As IDatabaseCompact Dim ws As ...


3

You could first select the layer in the table of contents refrencing this snippet: HowTo: Select a layer in the Table of Contents of ArcMap using ArcObjects Then, zoom to the active layer (ILayer) referencing this snippet: Zoom to Active Layer in TOC Snippet


1

I would potentially approach this with the iFeatureLayerDefinition interface. http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/0012/0012000004v2000000.htm It has a CreateSelectionLayer function which: Creates a new feature layer from the existing layer based on the current selection and the specified query expression.


1

You may use IFeatureLayerDefinition Interface. Provides access to members that define a subset of the features from the underlying feature class. Here is a general code example: IFeatureLayerDefinition Example


4

Couple things wrong in your loop. First you are calling dataset = datasets.Next(); at top and bottom of the loop. Right there you are skipping some feature classes. If your feature classes are nested in a Feature Dataset then you have to iterate through it also. It's a good idea to call IEnumDataset.Reset() before starting the loop to ensure you are at the ...


3

With ArcGIS Runtime SDK for Java, you can write standalone applications, viewing / editing mostly ArcGIS Online data With the ArcObjects java SDK, you can do almost everything ArcMap can do. In fact, ArcMap and ArcCatalog seems to be written with ArcObjects. With ArcObjects, you can even add functionality to ArcMap by adding toolbar buttons and ...


0

I think there must be a "Server" property which should set through propertyset interface.And if so,isn't it enough to change server name and SQLServer instance name to the name of remote database server and SQL instance which is running on it?for example : IPropertySet ipPropSet = new PropertySetClass(); ipPropSet.SetProperty("SERVER", ...


2

Try this syntax: topoError = eErrorFeat.Next Do While Not (topoError Is Nothing) topologyExt.AddActiveError(topoError, esriTEEventHint.esriTENone) topoError = eErrorFeat.Next Loop You may want to confirm that eErrorFeat is not actually Nothing?


0

Sorry I put this as an answer, this is to make the code easy to read. I have modified my code based on Hornbydd's help, unfortunately I still cannot get what I want. Now I can successfully select the features only in the desired layer, but still failed to get the field value of selected feature, the code cause error, also cause ArcMap crash. The following ...


1

It looks like you are using the older method of license check-out. Try this: if (ESRI.ArcGIS.RuntimeManager.ActiveRuntime == null) ESRI.ArcGIS.RuntimeManager.BindLicense(ESRI.ArcGIS.ProductCode.EngineOrDesktop); UPDATE: Based on your additional info it appears that you have a valid IWorkspace object. To access the contents you can use the ...


2

OK going to have a stab at this: Most of your code appears to be building a Network dataset but this line fdx = fdxc.FindExtension(esriGeoDatabase.esriDatasetType(7)) # get error here is trying to return a GeometricNetwork (7), have a try at returning a Networkdataset (19)?


0

Sorry for answering my own question, but i get the solution in the esri-developer-forum and don't want to hold it back. My mistake was not to use the DisplayFeatureClass of the geofeaturelayer. Also now I use the IDisplayRelationshipClass instead of IRelQueryTable and so it works fine.


0

I would try to convert your GeoDatabase to GeoJSON with ogr2ogr then import the .json file to mongodb. Gdal above version 1.11 has OpenFileGDB support, so this should be possible. When importing the json to mongodb, make sure that you don't try to import a featurecollection, but a file with the list of features without commas.


3

I think you are making this more difficult than it has to be. You are obtaining your selected features from IMap.FeatureSelection. So multiple layers could return a selection. A much better way is to get a handle on your ILayer, cast that into an IFeatureLayer then point an IFeatureSelection interface to IFeatureLayer. From this you can get an ...


0

If you're making an ArcGIS Add-In (rather than the old extension format), then I believe you can enable / disable buttons or menu items inside your button class like this: Protected Overrides Sub OnUpdate() Enabled = bSelected End Sub Where bSelected is your boolean indicating whether or not your feature is selected. You can check if a feature in a ...


2

To clarify the comments, the problem is that you have an IApplication object but haven't linked it to ArcMap (initialized the object): Dim topoUiD As UID = New UIDClass topoUiD.Value = "esriEditorExt.TopologyExtension" Dim m_application As IApplication = My.ArcMap.Application ' initialize the object Dim topologyExt As ITopologyExtension = ...


1

According to this example: public void RegisterDataset(IDataset dataset) { IVersionedObject3 versionedObject = (IVersionedObject3)dataset; bool IsRegistered; bool IsMovingEditsToBase; versionedObject.GetVersionRegistrationInfo(out IsRegistered, out IsMovingEditsToBase); if(IsRegistered) { if(IsMovingEditsToBase) { ...


4

Try replacing this line: pUnk_line = pFact.Create(CLSID(esriGeometry.Line)) with this: pUnk_line = pFact.Create(CLSID(esriGeometry.Polyline)) In the help on LineElementClass is says right at the bottom: Geometry: LineElement accepts geometry of type esriGeometryPolyline. The Polyline is used as the geometry with which the symbol is drawn.


2

I have eventually solved the issue, based on the post by Hornbydd. Thank you! As he suggested, something in my PATH environment variable was causing mixed architecture (32 and 64 bit) DLLs to get loaded. 1) I downloaded and installed ESRI's 64 bit geoprocessing software for ArcGIS 10.1 Service Pack 1. I had read somewhere else that Python uses a service to ...


3

If you want to select features by polygon using ArcObjects, you would typically use a spatial filter, which is very simple to implement. Here's an example in VB.NET, where pPolygon is your polygon object, and pLayer is the layer you wish to select features from: ' create the spatial filter Dim pSpatialFilter As ISpatialFilter = New SpatialFilterClass() ...



Top 50 recent answers are included