Tag Info

New answers tagged

0

Okay, I found a partial answer to this question. The reason why the layer showed up empty has to with the way I used a reference to the document. I opened up a new mxdocument from my unit test, but the tool I'm working on is an add-in so I need the correct IApplication reference. I isolated the problem in a fresh solution so I could test it (you can't really ...


0

I solved the problem, by getting the polygons exterior ring, IRing interface has the method GetSubcurveEx, this method is perfect for my case since I can specify which direction I want the subcurve to follow. I can specify clockwise or counter clockwise, so I got both directions and simply picked the shortest. Here is how I done it. ...


0

I think you are on the right way, but you should create the rasterlayer from the dataset as a separate layer first and then change the content of the layerfile. Something like this(don't know VB, casting IRasterLayer to ILayer): Dim rasterLayer As ESRI.ArcGIS.Carto.IRasterLayer = New RasterLayerClass() rasterLayer.CreateFromDataset(overstromingsGridDS) ...


0

For creating the button, you should look at the following documentation: https://github.com/Esri/developer-support/tree/master/arcobjects-c++/create-command-atl As for the other parts, I am unable to find many examples just yet.


0

It seems that this was caused by a rounding issue within ESRI, as although the COM interface will always return an array of doubles no matter what you send it (and setting an array of doubles worked for a hand-made PNG), the background of my PPM file would only change if the BackgroundValue was set to an array of int. In this format the RGB scaling was in ...


0

I faced the problem last year and had to learn: The proof of the pudding is in the eating :-o For every renderer the type of the value is different, in c# you have to create an type of object and put there the value as double or array of double... this is a very worst thing... byt maybe my code snippet helps a bit. if (catLyrRenderer is IRasterRGBRenderer) ...


2

According to the product engineer at Esri responsible for the Find Dialog, there is no way to customize the context menu on the result items of the "Features" tab: The Find dialog was refactored many releases ago so it could be reused in ArcReader, Engine, ArcMap, ArcScene and ArcGlobe. As a result the context menu for find features results doesn’t ...


1

Further to what Vince has indicated.. create a spatial reference with ISpatialReferenceFactory3 (CreateSpatialReference is the easiest) and then find out what it is. You have the SRID/EPSG code so create a spatial reference object and then test its type (ISpatialReference is implemented by both geographic and projected coordinate systems and also unknown ...


0

So this seems to be the correct way to check if a WKID is Projected or Geographic... edit: This is what I had done, but @Michael Miles Stimson found the proper method to use instead of relying on try/catch. public ISpatialReference getSpatialReference_byCode(int srid) { ISpatialReference spatialReference; ...


0

You need to project spatial reference with feature geometry. Try this code. pGeomResult.Project(pGeometry1.SpatialReference); IGeometry pGeomResult = pTopoOperator.Intersect(pGeometry1, esriGeometryDimension.esriGeometry2Dimension); // Calculate area for an intersect geomtry. IArea pCommonArea = (IArea)pGeomResult; double dblCommonArea = pCommonArea.Area; ...


1

You can get your feat geometry and create buffer using Topological operator. These code can use for you. double bufferDistance = 0.0; // Note: set buffer distance as you want. For eg:200 or 500 var featShape = feat.ShapeCopy as IGeometry; var topologicalOperator = featShape as ITopologicalOperator; var featureBuffer = ...


2

When using IMap.get_Layers you can supply a UID with the intended type, for example: UID pFeatureLayersUID = new UIDClass(); pFeatureLayersUID.Value = "{40A9E885-5533-11d0-98BE-00805F7CED21}"; IEnumLayer pMapLayers = gMap.get_Layers(pFeatureLayersUID, true); Will get you all the feature layers (Vector) in your current map recursively... normally you would ...


0

Great answers above, but just wanted to add my voice to the choir :) ArcObjects has some (specialized) functionality that the ArcGIS Runtime SDKs don't provide: complex features, geometric networks, topology, annotation classes, etc. is designed for desktop deployments has a LARGE footprint (file size and memory) is based on COM technology and is ...


2

This how I would do it: Create your two points Cast polygon into ICurve Use the ICurve.QueryPointAndDistance Method and get the DistanceAlongCurve value for each point Use ICurve.GetSubcurve Method to extract the red curve you have identified in your image.


1

The error sound and clear. You should refresh a version outside of an edit session. The RefreshVersion method refreshes the version to correspond with the database state the version references. For example, if a second application is editing the verison and saves their changes, you need to call the RefreshVersion method to see the latest ...


0

You could try to use WiX tooset it is very complete, and it will allow you to perform the registry of the ESRI dll's in the client machine. furthermore it has a good integration with visual studio.


0

Remove all other license checks and only retain Advanced level license: m_AOLicenseInitializer = new LicenseInitializer(); if (!m_AOLicenseInitializer.InitializeApplication (new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeAdvanced }, new ...


0

The ITopologicalOperator.Intersect() method constructs the geometry of the intersection. In you question you are talking about testing if geometries intersect not constructing the result of the intersection. I would look at the Interface IProximityOperator and the ReturnDistance method, a zero indicating they intersect.


0

In Arc 10.2 you can use IMapServerRESTLayer. Using this avoids using SOAP. Here is some code (VB.Net) that shows how it is used, with some extra code. This code is for a AddIn button. The extra code checks if the connection is OK by requesting a json file. Also, there is code for displaying the json file, and getting the REST file general information. I ...


2

I had your problem before. I will share a productive solution to solve your problem with InstallShield Limited Edition. Create a console application project in visual studio and let's call it "InvokeESRIRegAsm". Fill program.cs file with these methods: static void Main(string[] args) { if (args == null) { ...


1

You can use the Delete method in IFeature Interface. IFeature.Delete() For your code: ... lpVerFeat = lpVerFC.GetFeature(lpFeature.OID) lpVerFeat.Delete() ...


0

Convert the .NET color object from the color dialog to an IColor first using the RGB components first. Passing the color properties to a method like this should do it: public IColor GetColor(int pRed, int pGreen, int pBlue) { IRgbColor rgb = new RgbColorClass(); rgb.Red = pRed; rgb.Green = pGreen; rgb.Blue = pBlue; ...


0

Assuming the two points are on the the curve, you can use the QueryPointAndDistance on both points, get the difference and that is what you looking for. Public Function distancebetweenTwoPoints(pPolyline As IPolyline, pPoint1 As IPoint, pPoint2 As IPoint) As Double Try Dim distancetoPoint1 As Double = 0 Dim distancetoPoint2 As Double ...


0

```CS IFeatureClass featureClass = null; IObjectClass objectClass = feature.Class; featureClass = objectClass as IFeatureClass; IGeoFeatureLayer layer = featureLayer as IGeoFeatureLayer; IFeatureRenderer featureRenderer = layer.Renderer; ISymbol symbol = null; if (featureRenderer is IUniqueValueRenderer) { ...


0

I ended up figuring it out! All I had to do to access both the checkbox and to update the form was do this.checkboxname.GetItemChecked(index) and change the individual labels and other items by directly editing the label's contents using this._____


0

I can check the URL in your snapshot and say the layer you are trying to work with is an ImageServer Layer. http://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/Topographic/ImageServer You can not access an imageserver layer as a feature layer. You can only access map server layers that have "Feature Access" enabled, as a feature layer. (e.g. ...


0

I believe the Interface ITableSort does not actually sort the table, it returns lists or cursors of sorted data, which is subtly different. This has been discussed as far back as 2007 as shown in these ESRI forum threads: http://forums.esri.com/Thread.asp?c=93&f=993&t=212789 http://forums.esri.com/Thread.asp?c=93&f=988&t=238000 One ...


1

Looking at the API for the Interface IAddDataDialog it appears you need to set the Document property which you are not doing in the screen shot you supplied. May be that is the source of the problem? In the walk through example on how to build a map viewing application they simply add a reference to the add data button to a toolbar, that may be a simpler ...


0

Adjusting with what @Vince was saying... Buffer does not accept an array in its out_feature_class property. However, you're kind of on the right track with a for each loop. Taking part of your code, here one way to do it. I am using a List instead of an Array because I don't care about memory usage and initializing my Array properly. There are numerous ...



Top 50 recent answers are included