|
POST
|
Jeff Boyton thanks for the tip. I'm fairly new to WPF but am ramping up quick. So you put the reference on a DockPane? if you have any examples or know of any links I could take a look at, I would very much appreciate it.
... View more
04-28-2020
11:18 AM
|
0
|
3
|
2478
|
|
POST
|
Gintautas Kmieliauskas thanks for the input. I have some implemented code that was a hack based on the extension of the file in the path. However I will give your suggestion a try since that seems to be more SDK based.
... View more
04-28-2020
11:14 AM
|
0
|
0
|
1582
|
|
IDEA
|
We have many use cases. One example is we need a uniform mesh of points where we query a DEM dataset. But we are sidetracking too much on this request. In fact it is straightforward. Here is what happens roughly within the gp tool: 1. Take the inputs 2. Create vertices 3. Create a polygon geometry or polyline geometry based on the vertices. The point output is just about there since the points are already created in step #2. Can we make a workaround by offsetting the label points...sure but then you have an extra feature class with the actual geometry. This request is just an extension of already what happens. With a POINT output we just get the vertices as a point feature class and by default no label feature class. its that straightforward.
... View more
04-28-2020
11:11 AM
|
0
|
0
|
574
|
|
POST
|
Trying to work my way through my first add-in. One thing I am struggling with is user inputs. I have a DockPane where the user can input a path to their output feature class and the coordinate system of the output. The user can input their desired data either by typing in the textbox or using the browse functions to fill that in for them. My struggle is to convert the contents of the textbox to usable objects. For example, after the user either types in their coordinate system or uses the CoordSysDialog to choose it then how do I convert the result to a SpatialReference object? Same thing with the output feature class. From the textbox how do I determine if the feature class is a shapefile or a feature class in a geodb? What are the best practices for these types of inputs? I see them in the ArcGIS Pro geoprocessing tools so there must be some way to validate each one and the proper type.
... View more
04-25-2020
09:25 PM
|
1
|
5
|
1687
|
|
POST
|
I am a real stickler for documentation. I also found other confusing articles here: https://community.esri.com/thread/252078-confused-about-proconcepts-articles
... View more
04-25-2020
08:31 PM
|
0
|
0
|
2046
|
|
POST
|
So I just started with a Pro add-in and have added a DockPane. The user fills in input and I send that to a geoprocessing function. In the DockPane I have a button with a click event Private Sub btnGo_Click(sender As Object, e As RoutedEventArgs) Handles btnGo.Click Try 'collect WPF form info DoGp(info) Catch ex As Exception MessageBox.Show(ex.Message, "Exception", MessageBoxButton.OK, MessageBoxImage.Error) End Try End Sub In a separate module I have Public Async Sub DoGp(ByVal vg As Info) Try Dim toolPath As String = "management.CreateFishnet" Dim progDlg As ProgressDialog = New ProgressDialog("Running Geoprocessing Tool", "Cancel", 100, True) progDlg.Show() Dim progSrc As CancelableProgressorSource = New CancelableProgressorSource(progDlg) Dim res As IGPResult = Await Geoprocessing.ExecuteToolAsync(toolPath, params, envr, progSrc.Progressor, GPExecuteToolFlags.Default) progDlg.Hide() If res.IsFailed Then Throw New Exception("Geoprocessing tool failed.") Catch ex As Exception Debug.Print(ex.ToString) Throw 'crashes here End Try End Sub When I run it and there is an error in the output there is an unhandled exception at the line Throw: An exception of type 'System.Exception' occurred in MyAddin.dll but was not handled in user code Geoprocessing tool failed. I have Try-Catch in the calling code and also in the module so why is it not propagated?
... View more
04-25-2020
08:16 PM
|
0
|
4
|
1844
|
|
IDEA
|
That's too many extra steps for something that can easily be coded in the gp. I am trying to expand the functionality of this tool and all the logic is there so it's a simple addition. The points are a mesh just like the fishnet. sometimes I need points rather than polygons.
... View more
04-25-2020
04:47 PM
|
0
|
1
|
3701
|
|
POST
|
Jeff Boyton can you share how you added the CoordinateSystemsControl to your project? I'm looking everywhere for it but cant seem to find it to add to my References.
... View more
04-24-2020
07:33 PM
|
0
|
5
|
2478
|
|
IDEA
|
Not sure what that means. The whole point (no pun intended) was to get the mesh but only the intersections.
... View more
04-24-2020
04:06 PM
|
0
|
1
|
3701
|
|
POST
|
The article in Item #1 I think has a bug.addToProjectDialog to setup the dialog and then calling addToMapDialog addToProjectDialog.Filter = ItemFilters.composite_maps_import; bool? ok = addToMapDialog.ShowDialog();
... View more
04-24-2020
02:26 PM
|
0
|
2
|
2046
|
|
POST
|
I've been looking at some posts and don't quite get how to incorporate a coordinate system dialog in my add-in. This post implies that ESRI has provided a built in control Custom spatial references in the coordinate system control. This post implies that I have to compile an add-in How to capture none in Current Z for CoordSysDialog. Im confused as to how to use the control in my add-in. Any help appreciated.
... View more
04-24-2020
01:59 PM
|
0
|
0
|
945
|
|
POST
|
The geoprocessing panes also take forever to display. Just to display the pane on my machine takes about 5 to 20 seconds.
... View more
04-24-2020
01:09 PM
|
5
|
2
|
4398
|
|
IDEA
|
Also there are bound to be duplicates so not really sure that we would need more than one point per corner.
... View more
04-24-2020
11:06 AM
|
0
|
1
|
3701
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-25-2020 09:25 PM | |
| 1 | 08-17-2022 11:17 AM | |
| 1 | 07-24-2022 01:36 PM | |
| 1 | 07-14-2022 11:22 AM | |
| 1 | 07-14-2022 10:29 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-27-2025
11:11 AM
|