Tag Info

Hot answers tagged

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.


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

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


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


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


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


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


2

Had a quick search on Google for what R6034 meant and here are some threads, it may not even be anything to do with ArcMap? Thread Reason StackOverflow Q&A And a whole load more...


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?


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


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)?


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


1

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


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"); ...


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


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


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


1

ESRI have "improved" their forum site and it's now hard to find any of the archived threads but I did find this code fragment in a thread from 2008. I've done very little in Engine so this may be a red herring? ICommand command = new ControlsZoomToSelectedCommandClass(); command.OnCreate(this.axMapControl1.Object); command.OnClick();


1

If you take a closer look at the documentation example, you'll notice that they use the IFeatureClass::AddField function IField guidField = new FieldClass(); IFieldEdit guidFieldEdit = (IFieldEdit)guidField; guidFieldEdit.Name_2 = "OldGlobalID"; guidFieldEdit.Type_2 = esriFieldType.esriFieldTypeGUID; guidFieldEdit.DefaultValue_2 = null; ...



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