|
POST
|
It works great! Thanks. Not only that, it was in the comments of the DAML and I didn't see it.
... View more
03-13-2020
01:40 PM
|
0
|
0
|
1452
|
|
POST
|
Just getting started with a custom addin. I cant figure out how to change the main tab caption. be default it is "Add-in" but I want to change it to "MyCompany". Is there a way to do that?
... View more
03-13-2020
12:44 PM
|
0
|
2
|
1497
|
|
POST
|
Using ArcObjects and VB.NET I have a routine that does several geoprocessing functions. These processes are built by ESRI to send messages to the ArcMap statusbar. That seems to over-ride my custom messages and progressbar. Is there a way to supress the geoprocessing messages sent to the statusbar?
... View more
03-11-2020
03:14 PM
|
0
|
4
|
884
|
|
IDEA
|
ArcGIS and Pro: I code mostly in .NET and there are several instances where I need to use geoprocessing on geometry (IPoint, Ipolyline, IPolygon) but it seems almost none of the geoprocessing functions support this? Why? I have to resort to creating an InMemory feature class which requires more overhead if you are creating many geometry objects. I've also found that one or two geoprocessing functions will not work with an InMemory feature class. Please allow geoprocessing functions to take geometry as an input.
... View more
03-03-2020
10:03 AM
|
1
|
0
|
311
|
|
POST
|
I also tried an in-memory feature class and that crashes with a COM exception.
... View more
03-29-2018
07:18 AM
|
0
|
0
|
676
|
|
POST
|
I am struggling to get an GP tool to work with Geometry. What I do is create an IPolygon object through .NET code. All that works great except sometimes the results have slivers. So it looks like the Integrate tool could help me here. Again I have an IPolygon object and am not creating any feature classes on disk. I will draw the polygon to the screen and that is it. So I try this: 'use the Integrate tool to get rid of slivers Dim gp As Geoprocessor = New Geoprocessor gp.OverwriteOutput = True gp.AddOutputsToMap = False Dim intgGeom As Integrate = New Integrate intgGeom.in_features = pClonePolygon 'the input polygon intgGeom.cluster_tolerance = "2 Meters" 'set the XYTolerance to 2 Meters gp.Execute(intgGeom, Nothing) No cigar. I get this exception: A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in ESRI.ArcGIS.Geoprocessor.dll System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component. According to this help page all GP tools should work with geometry: Using geometry objects with geoprocessing tools—Help | ArcGIS Desktop So what am I doing wrong here? ~AGP
... View more
03-23-2018
09:10 AM
|
0
|
2
|
867
|
|
POST
|
Great info. Let me study the code and see how I can use it in my process.
... View more
07-07-2017
11:28 AM
|
0
|
0
|
764
|
|
POST
|
ArcGIS 10.1 with VB2010 I am using the GxDialog to get the users option to save a feature class. The target can be a shapefile, geodatabase, or Dataset inside a geodatabase. I can’t wrap my head around how I am supposed to parse the Workspace, FeatureDataset, and FeatureClass name to use in creating the feature class. So far I have 'setup the save dialog Dim pGxDialog As IGxDialog = New GxDialog Dim pGxObjFilterSh As IGxObjectFilter = New GxFilterShapefiles 'shapefiles Dim pGxObjFilterPg As IGxObjectFilter = New GxFilterPGDBFeatureClasses 'personal geodb (Access db) 'Dim pGxObjFilterFg As IGxObjectFilter = New GxFilterFGDBFeatureClasses 'file geodb (ESRI db) Dim pGxObjectFilterCollection As IGxObjectFilterCollection = CType(pGxDialog, IGxObjectFilterCollection) pGxObjectFilterCollection.AddFilter(pGxObjFilterSh, True) pGxObjectFilterCollection.AddFilter(pGxObjFilterPg, False) 'this one actually contains both file and personal geodb feature classes 'pGxObjectFilterCollection.AddFilter(pGxObjFilterFg, False) 'get the users selection (it can be a shapefile or a geodb). Catalog paths consist of two parts: the workspace and the base name. If pGxDialog.DoModalSave(MyApp.hWnd) Then Dim catalogPath As String = My.Computer.FileSystem.CombinePath(pGxDialog.FinalLocation.FullName, pGxDialog.Name) Dim workspaceCategory As String = pGxDialog.FinalLocation.Category Debug.Print(String.Format("catalogPath={0}, workspaceCategory={1}", catalogPath, workspaceCategory)) Debug.Print("ClassID={0}", pGxDialog.FinalLocation.ClassID) 'I can use the workspaceCategory to get the target type. But how do I split out either the entire string path or 'the pGxDialog to create a Workspace object. How do I set up the objects to allow a Feature Dataset? Select Case workspaceCategory Case "Personal Geodatabase", "Personal Geodatabase Feature Dataset" 'personal geodb (Access database C:\myData\mypGDB.mdb) wkspFactory = New AccessWorkspaceFactory pCLSID.Value = "esriGeodatabase.Feature" Case "File Geodatabase", "File Geodatabase Feature Dataset" 'file geodb (File database C:\myData\myfGDB.gdb) wkspFactory = New FileGDBWorkspaceFactory pCLSID.Value = "esriGeodatabase.Feature" Case "Folder" 'shapefile (c:\mydata\) wkspFactory = New ShapefileWorkspaceFactory pCLSID.Value = "esriCore.Feature" Case Else Throw New Exception("Unsupported workspace category: " & workspaceCategory) End Select End If
... View more
07-06-2017
01:23 PM
|
0
|
2
|
1279
|
|
POST
|
Thanks. I think this will work although I have to set the GP.AddOutputsToMap = False otherwise it will get added twice.
... View more
06-01-2015
09:30 AM
|
1
|
0
|
1010
|
|
POST
|
ArcGIS 10.1: I am using ArcObjects in .NET with some geoprocessing. It works great. There is an option to add the resulting feature class to the map. That works great too. However how do I get a reference to this layer to move it to a group layer? Dim GP As GeoProcessor = New GeoProcessor GP.AddOutputsToMap = True 'True if we want to add outputs to map, False if we dont. Dim parameters As IVariantArray = New VarArray parameters.Add(inDatasets) parameters.Add(toPointFullName) parameters.Add("") Dim res As IGeoProcessorResult = GP.Execute("Merge_management", parameters, Nothing) 'todo: how do I get a reference to ILayer of the resulting layer added to map? Thanks ~AGP
... View more
05-29-2015
01:56 PM
|
0
|
2
|
4207
|
|
POST
|
Looking at my challenge I think I see probably the most efficient way to do this is to give the user the option to do it the standard way or to do individual queries for each item. At most they will have 10 items to look up. if they have more I warn them that it could take several minutes. As I loop through each item I get the recordset for that one item and add it to a grid. This way I am assured that the final items the user sees are in the order they have input into the list box. I chose this over a more complicated sorting routine since the number of input items is really not going to be that large.
... View more
02-24-2014
11:07 AM
|
0
|
0
|
796
|
|
POST
|
I was thinking I would have to sort it myself since the function returns a list of airport classes. I did read about Postfix Clause but I cant use an ORDER BY since there is no field that I want to order by. Its really as input by the user which can be anything really. Thanks for the tips.
... View more
02-23-2014
03:36 PM
|
0
|
0
|
796
|
|
POST
|
The info I got from ESRI tech support was that at 10.2 the Military Analyst and MOLE extensions (Defense Solutions) would be retired. That means you have to find new ways to do things but most of the functions are now in the core. Check this out: http://resources.arcgis.com/en/help/main/10.2/index.html#//000n00000005000000 If there is a function you use I can check what was suggested as a replacement, otherwise most everything is covered in the link above. ~AGP
... View more
02-22-2014
04:03 PM
|
0
|
0
|
720
|
|
POST
|
In VB2010 I am using the IQueryFilter interface to hit a shapefile and get back some records. It works great but am having trouble figuring out how to get results back in an order as input by the user. They input airports in a listbox and I take that and create a where clause out of it. By default the recordset returned is in alphabetical order which will not work here as the user needs the results back in the order they input. Dim pQryFltr As IQueryFilter = New QueryFilter pQryFltr.WhereClause = "APT LIKE 'DFW' OR APT LIKE 'STL' OR APT LIKE 'ORD'" results come back as DFW ORD STL I am trying to figure out how I can return the results in an order that is equivalent to how the user input the data. Is that even possible? ~AGP
... View more
02-21-2014
06:00 AM
|
0
|
5
|
2926
|