Tag Info

Hot answers tagged

2

Don't know what will happen, I've never used ArcSDE. But you can check the state of the Editor using IEditor.EditState property and use that to stop your addin launching what ever code it was going to do?


2

I think this blog post on the Esri site is still applicable: ArcObjects or the ArcGIS Runtime SDKs for Java and WPF—which is right for you? Though this question discusses the Java flavors, it may help as well.


2

The Esri help can be quite counter-intuitive, you need to know what you're searching for to get the description... The issue here is that the pictureElement doesn't have a geometry property.. see the Help page for picture element: However the IElement, which implements JpegPictureElement, does have a geometry: Explanation of Esri help symbols, they are ...


2

public static bool CompareSpatialRefs(ISpatialReference sourceSR, ISpatialReference targetSR) { IClone sClone = sourceSR as IClone; IClone tClone = targetSR as IClone; // first level test compares the coordinate system component if (!sClone.IsEqual(tClone)) return false; ...


2

You can obtain the spatial reference of a feature class using the IGeoDataset Interface: ' Spatial reference of a feature class Dim geoDataset As IGeoDataset Set geoDataset = featureLayer.FeatureClass Set spatialReference = geoDataset.SpatialReference http://forums.esri.com/Thread.asp?c=159&f=1707&t=223709 OR '''<summary>Get the spatial ...


2

In addition to the previous fine answer: polyline.SpatialReference = ArcMap.Document.FocusMap.SpatialReference; ISpatialReferenceFactory3 SRfact = (ISpatialReferenceFactory3)new SpatialReferenceEnvironment(); ISpatialReference SR = SRfact.CreateSpatialReference(EPSG_of_Projected_CoSys); polyline.Project(SR); myForm.myTextbox.Text = ...


2

OK, in the function GetPolylineFromMouseClicks just before the return statement you could do something like: myForm.myTextbox.Text = polyline.Length.ToString I'm assuming the RubberLineClass picks up on the coordinate system of the dataframe. But that leads to another question. If you dataframe is WGS84 then length in decimal degrees is not going to mean ...


2

From the ArcObjects documentation available here. The ShapeCopy property is a cloned copy of the feature’s Shape. When modifying the geometry of a feature or a set of features, use the ShapeCopy property to obtain a copy of the feature's geometry, perform the modification on the geometries, then apply the modifications by setting the geometry to the ...


1

Thank's guys, I have solved my problem. IPolygon4 polygon = buld_F.Shape as IPolygon4; IGeometryBag exteriorRingGeometryBag = polygon.ExteriorRingBag; IGeometryCollection exteriorRingGeometryCollection = exteriorRingGeometryBag as IGeometryCollection; for (int i = 0; i < ...


1

I can see no event listener for TopologyLayer but you can trap when a change in visibility has occurred by listening to the map refresh view event. Below is the VBA code that will achieve this. You must first run setup() so mapEve object is set and the Topology layer is the top layer. Dim WithEvents mapEve As Map Public Sub setup() ' Run this ...


1

You can do this by going into the catalog and checking the properties window of each feature class under XY Coordinate System. The quickest way would be to compare WKID numbers of each layer. You can also use the Describe function to identify the spatial reference and compare them. see this for more info on this.


1

Okay, I figured it out. Here is some code. (In this example, the Annotation Feature layer was previously stored in m_FLayer and the names of the classes are written to a checked list box on a form.) frmShowAnnoClasses theForm = new frmShowAnnoClasses(); IAnnotationLayer pALayer = (IAnnotationLayer)m_FLayer; ...


1

I don't think you can access symbology from a single feature . The symbology renderer is defined at the level of the layer. You can set the renderer from the IGeoFeatureLayer, you access this by casting from IFeaturelayer. More info see: ...


1

In this case the field NumEvents was not available until the DisplayRelationship was set up. gridLayer = new FeatureLayerClass(); gridLayer.FeatureClass = layersFeatureWorkspace.OpenFeatureClass(layerName); gridLayer.Name = "Density Grid"; gridLayer.Cached = true; gridLayer.Selectable = true; gridLayer.ShowTips = true; [...] // Create relationship between ...



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