|
POST
|
Hi Carsten, Unfortunately this is a bug. If you ensure you have the task pane open when you run this code, it should succeed. I have added an issue to our backlog to fix this for the next release. Sorry for the inconvenience. Narelle
... View more
08-09-2018
11:40 AM
|
1
|
1
|
792
|
|
POST
|
As you are seeing the issue with a file geodatabase is there any chance you can post your data (or a subset where you can still duplicate the sporadic problem)? Similarly with your entire add-in code. ? If the data and/or code is proprietary I understand if you can't post it, but it may help us duplicate the problem a little more quickly. Right now we've identified one data locking issue which returns the 'edit operation failed' rather than something more specific. But it is not a sporadic problem and can be reproduced with a clear set of steps. We are working on resolving this issue but it's unclear whether your problem is a data locking issue or something else. The data and code along with some reproducible steps (even for a sporadic problem) will help us with trying to track down your problem. Thanks Narelle
... View more
08-08-2018
11:05 AM
|
0
|
0
|
3200
|
|
POST
|
Hi Brian, Are you working with SDE or a file geodatabase? Standard featureclasses or feature services? Any additional information about the data you can share - relationships, networks? If it's a file geodatabase with standard feature classes is there any chance you could post the data (or a subset where you can still duplicate the sporadic problem), it might just help us duplicate the problem a little easier, If the data is proprietary I understand if you can't post it, Thanks Narelle
... View more
08-07-2018
10:12 AM
|
0
|
0
|
1136
|
|
POST
|
Thanks Steve. I've already made an issue to update the states and condition documentation.
... View more
08-01-2018
10:52 AM
|
0
|
0
|
2029
|
|
POST
|
Steve, It is possible to build complex conditions based off of a number of states. For example <insertCondition id="myCondition" caption="My Condition"> <or> <state id="state1"/> <state id="state2"/> </or> </insertCondition> <insertCondition id="myCondition2" caption="My Condition 2"> <and> <not> <state id="state1"/> </not> <not> <state id="state3"/> </not> </and> </insertCondition> You can use your own states or any of the Esri defined states in your conditions. To use Esri defined conditions, you need to determine their state definition. You can accomplish this by searching for the condition in the appropriate module daml file. For example esri_mapping_xxx condition can be found in the (install_folder)\bin\Extensions\Mapping\ADMapping.daml file. There are some special Esri conditions - such as esri_mapping_mapPane and esri_mapping_layoutPane that are actually states. So yes you are able to use esri_mapping_mapPane within your own condition definitions. Narelle
... View more
08-01-2018
10:23 AM
|
0
|
0
|
2029
|
|
POST
|
Steve, Here's one way of accomplishing this. 1. Create a new MapTool. In the constructor set the SketchType to be SketchGeometryType.Point. In the OnSketchCompleteAsync method add the following code protected override Task<bool> OnSketchCompleteAsync(Geometry geometry) { if (geometry == null) return Task.FromResult(true); var geomType = geometry.GeometryType; if (geomType != GeometryType.Point) return Task.FromResult(true); var point = geometry as ArcGIS.Core.Geometry.MapPoint; double x = point?.X ?? 0.0; double y = point?.Y ?? 0.0; double z = point?.Z ?? 0.0; // throw an event with x, y, z return Task.FromResult(true); } 2. Code a custom event which has the X, Y, Z values as part of the event arguments. See the following sample https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/CustomEvent as a guide. 3. In your tool, publish the event with the x, y, z values in the OnSketchCompleteAsync. In your dockpane viewmodel subscribe to the event and use the x, y, z coordinates passed as appropriate. 4. Set up the toggle button on the dockpane view to bind to two properties on your viewmodel. The buttons IsChecked property should bind to IsCoordinatesToolActive and the Command property should bind to GetCoordinatesCommand. 5. Add the following code to the dock pane view model. protected GetCoordinatesDockPaneViewModel() { // set up the command _getCoordinatesCommand = new RelayCommand(() => { // replace with your daml id for the GetCoordinates tool FrameworkApplication.SetCurrentToolAsync("Sample_GetCoordinates"); // subscribe to the active tool event ActiveToolChangedEvent.Subscribe(OnActiveToolChanged); }); } // occurs when the active tool is changed private void OnActiveToolChanged(ToolEventArgs e) { // is it the getCoordinates tool? - replace with your daml id bool bGetCoordsActive = e?.CurrentID == "Sample_GetCoordinates"; if (!bGetCoordsActive) { // if not active, set the flag to false and unsubscribe to the event IsCoordinatesToolActive = false; ActiveToolChangedEvent.Unsubscribe(OnActiveToolChanged); } else { // if active, set the flag to true and execute the command IsCoordinatesToolActive = true; _getCoordinatesCommand.Execute(null); } } // bind the buttons Command property to this in your view private RelayCommand _getCoordinatesCommand; public ICommand GetCoordinatesCommand => _getCoordinatesCommand; // bind the buttons IsChecked property to this in your view private bool _IsCoordinatesToolActive; public bool IsCoordinatesToolActive { get => _IsCoordinatesToolActive; set { if (!value) { // if not checked, ensure that the default tool is set FrameworkApplication.SetCurrentToolAsync("esri_mapping_exploreTool"); } SetProperty(ref _IsCoordinatesToolActive, value); } } Narelle
... View more
07-31-2018
10:10 AM
|
1
|
0
|
788
|
|
POST
|
You shouldn't have to add the number of steps or increment status.Value Try adding a Task.Delay(1000).Wait(); call to block the CIM after every line that updates status.Message. Adjust the delay accordingly if 1000 milliseconds is too long.
... View more
07-26-2018
06:35 PM
|
0
|
0
|
4029
|
|
POST
|
Steve, Can you share a subset of your code that illustrates this problem. (ie daml, and the custom control) Thanks Narelle
... View more
07-26-2018
11:04 AM
|
0
|
2
|
1470
|
|
POST
|
Steve, Try this. protected override async void OnClick() { using (var progress = new ProgressDialog("start message", 10)) { var status = new ProgressorSource(progress); progress.Show(); int idx = 0; while (idx < 10) { status.Value += 1; status.Message = "Test " + idx.ToString(); // this works too // status.Progressor.Message = "Test " + idx.ToString(); idx++; // do some long running method await QueuedTask.Run(async () => { await Task.Delay(1000); }); } progress.Hide(); } }
... View more
07-26-2018
10:45 AM
|
0
|
1
|
4029
|
|
POST
|
Brian, Try adding a 'using' around your Search line to ensure the rowCursor is disposed of correctly eg. using (RowCursor wsCursor = waterServiceLayer.Search(wsFilter))
{
Feature wsFeature;
//Go to the first item in the cursor, and use it as a Feature
wsCursor.MoveNext();
wsFeature = (Feature)wsCursor.Current;
if (wsFeature != null)
{
...
}
} The other thing to try would be to check the return value of editOperation.Execute and editOperation.ErrorMessage if you get a failure. Narelle
... View more
07-25-2018
08:27 AM
|
2
|
2
|
1136
|
|
POST
|
Steve, take a look at the sample at this location arcgis-pro-sdk-community-samples/Framework/ProgressDialog at master · Esri/arcgis-pro-sdk-community-samples · GitHub It illustrates using the ProgressDialog with a ProgressSource or a CancellableProgressorSource that updates messages. Narelle
... View more
07-25-2018
08:16 AM
|
0
|
1
|
4029
|
|
POST
|
I'm still not seeing any problems. Here is a button click with a similar scenario to what you outlined - creating a feature with null geometry. I never see "boo" in a message box or get an exception. What version of Pro are you using?. Is there anything particular about your data or the way you're calling the feature creation? protected override async void OnClick() { bool result = await QueuedTask.Run(async () => { FeatureLayer featureLayer = MapView.Active.Map.FindLayers("Point_Paired").FirstOrDefault() as FeatureLayer; if (featureLayer == null) return false; var editOperation = new EditOperation(); var atts = new Dictionary<string, object>(); // create with empty attributes - no shape editOperation.Create(featureLayer, atts); bool creationResult = await editOperation.ExecuteAsync(); if (editOperation.IsSucceeded) { Application.Current.Dispatcher.Invoke(() => { var pane = FrameworkApplication.DockPaneManager.Find("esri_editing_AttributesDockPane"); if (pane != null) { pane.Pin(); pane.Activate(); } else ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show("boo"); }); } return creationResult; }); }
... View more
07-24-2018
03:33 PM
|
0
|
0
|
1706
|
|
POST
|
Steve, Make sure you are on the UI thread (ie not on the background thread) when you call DockPaneManager.Find. Dockpanes are created on the UI thread and should not be accessed on the CIM / background thread. I suspect this is why you are having this problem. Narelle
... View more
07-24-2018
12:32 PM
|
0
|
2
|
1706
|
|
POST
|
What is the value of 'operationResult'. when you run the code? If it is false is there a useful string in op.ErrorMessage? From what you've posted here, it appears that the geometry function is calculating values successfully but it is the edit which fails to be committed. Are you able to edit this same data when using ArcGIS Pro (modify an attribute or use move/rotate/scale to modify the geometry). Narelle
... View more
07-19-2018
02:00 PM
|
0
|
0
|
1445
|
|
POST
|
Brian, In addition you should never assume that there is always a mapview active. What if your user has a layout active? What if your user has no mapviews open. In both of these scenarios, MapView.Active will be null and MapView.Active.Map will throw a nullReferenceException as you are experiencing. Rather than wrap in a try, catch. you should add the following to your code if (MapView.Active == null) return;
... View more
04-12-2018
09:29 AM
|
1
|
0
|
1415
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-27-2025 06:04 PM | |
| 1 | 03-24-2025 06:53 PM | |
| 1 | 08-08-2024 09:44 PM | |
| 1 | 07-18-2024 04:46 PM | |
| 1 | 06-04-2024 07:18 PM |
| Online Status |
Online
|
| Date Last Visited |
yesterday
|