Tag Info

New answers tagged

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


0

I got this figured out, the command class needs to be of type Library class in a different solution, not the same one as the extension


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


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


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


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


0

After spending some time working though Beginning ArcGIS for Desktop Development using .NET, I came back and was reviewing what was going wrong for me. For whatever reason in the code block Michael gave me when I added in a geographic layer the pEnv.YMax and the pEnv.YMin were coming out as the same number, hence the ActiveView.Extent was staying the same ...


0

I got this done, I have accessed the symbol thanks all. private void ArrangeCrossSetionView(IEnumSchematicInMemoryFeature containerElements, IGeoFeatureLayer geoFtr, ISchematicLayer schematicLayer) { ISchematicInMemoryFeature feature; while ((feature = containerElements.Next()) != null) { var symbol = ...


0

an accepted answer should mean it is working and correct, so why isnt this working for me ? I did the same thing and nothing happens when I click on the map. I even tried this twice, first time, I created a class that inheret Basetool, nothing happens... and then I tried to create a class that implements Itool implemented the members. again run the tool no ...


0

When you say "...add graphics as the lowest layer in the active map" Are you trying to add graphics to an annotation group which is associated with a layer? When you turn that layer off then the graphic will disappear too so labels in other layers will show. Whilst that layer is visible the graphic would obscure the labels. I think @Chris W is on the right ...


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


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.


0

if IPolyLine was used. you have to only set zAware to true to solve this problem. Dim newSegCollection As ISegmentCollection = New Polyline Dim zAware As IZAware = CType(newSegCollection, IZAware) zAware.ZAware = True then you can set z for FromPoint and ToPoint for each line in your IPolyLine shape. and if you want to set same z for all lines in ...


0

in my mind, the major differentiators between those two ESRI platforms are: ArcObjects is not free (as in beer or any other way), you need ArcGIS Desktop, Engine, or Server licenses for deployment. You can't install the ArcObjects SDK without an existing Desktop or Server installation being present. ArcObjects is for Windows Desktop (either ArcMap ...


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.


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


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?



Top 50 recent answers are included