|
POST
|
Hi, Your assembly must exists inside esriAddinX file. Before execution your esriAddinX file will be moved to cache folder then extracted. Open your compiled esriAddinX file with archiver as archive. Step inside Install folder. Your assembly must be located here.
... View more
01-25-2024
10:25 PM
|
0
|
1
|
1686
|
|
POST
|
Try to set FrameworkApplication.Current.MainWindow as owner for MessageBox.
... View more
01-23-2024
03:54 AM
|
0
|
1
|
1859
|
|
POST
|
Hi, 1. MessageBox should be called from UI thread, because RowEvent callbacks are always called on the QueuedTask. If you could get your Progress Dialog window handler, you could use MessageBox Show method overload with window handler. 2. I have tried cancel edit on sample below and it reverts back value in Attribute Table window, but not in Attribute Dockpane. It could be issue with Attribute Dockpane. protected override void OnClick()
{
//run on MCT
QueuedTask.Run(() =>
{
var mapLayers = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>();
foreach (var layer in mapLayers)
{
var layerTable = layer.GetTable();
RowChangedEvent.Subscribe(onRowEvent, layerTable);
RowCreatedEvent.Subscribe(onRowEvent, layerTable);
RowDeletedEvent.Subscribe(onRowEvent, layerTable);
}
});
}
private void onRowEvent(RowChangedEventArgs obj)
{
obj.CancelEdit();
}
... View more
01-23-2024
03:36 AM
|
0
|
3
|
1867
|
|
POST
|
Hi, Look at the thread. You can make a search in ArcGIS Pro SDK Questions and you will find answers for the most of your questions.
... View more
01-22-2024
03:50 AM
|
0
|
0
|
2118
|
|
POST
|
Hi, It could show that your tool was not started for not valid parameters or invalid tool path/name. Try to use GPTool Execute Event Handler to get more information about tool execution. System.Threading.CancellationTokenSource _cts;
string ozone_points = @"C:\data\ca_ozone.gdb\O3_Sep06_3pm";
string[] args = { ozone_points, "OZONE", "", "in_memory\\raster", "300",
"EMPIRICAL", "300", "5", "5000",
"NBRTYPE=StandardCircular RADIUS=310833.272442914 ANGLE=0 NBR_MAX=10 SECTOR_TYPE=ONE_SECTOR",
"PREDICTION", "0.5", "EXCEED", "", "K_BESSEL" };
string tool_path = "ga.EmpiricalBayesianKriging";
_cts = new System.Threading.CancellationTokenSource();
var result = await Geoprocessing.ExecuteToolAsync(tool_path, args, null, _cts.Token,
(event_name, o) => // implement delegate and handle events
{
switch (event_name)
{
case "OnValidate": // stop execute if any warnings
if ((o as IGPMessage[]).Any(it => it.Type == GPMessageType.Warning))
break;
case "OnProgressMessage":
string msg = string.Format("{0}: {1}", new object[] { event_name, (string)o });
System.Windows.MessageBox.Show(msg);
break;
case "OnProgressPos":
string msg2 = string.Format("{0}: {1} %", new object[] { event_name, (int)o });
System.Windows.MessageBox.Show(msg2);
break;
}
});
var ret = result;
_cts = null;
... View more
01-21-2024
10:41 PM
|
0
|
0
|
1147
|
|
POST
|
Hi, Your code implements creation of RasterLayer form lyrx file. Try line below to create raster layer from path: var rasterLayer = LayerFactory.Instance.CreateLayer(new Uri(outputdata), groupLayer) as RasterLayer; More info in ArcGIS Pro SDK API Reference
... View more
01-21-2024
10:32 PM
|
0
|
1
|
1643
|
|
POST
|
Yes, you are right I have checked inheritance of FeatureCollectionTable, but didn't read until the end. FeatureCollectionLayer may not help you too. What do you think about changing your package and send coordinates of the path as json or geojson string? You will need to add additional geoprocessing step to package content for converting json/geojson string to features.
... View more
01-18-2024
10:31 AM
|
1
|
1
|
2006
|
|
POST
|
Hi, Look at the question . Main idea would be to switch to GUI thread and set Label_1 Content property: Application.Current.Dispatcher.Invoke(() =>
{
Label_1.Content = "some text";
});
... View more
01-16-2024
02:04 AM
|
2
|
1
|
1442
|
|
POST
|
Hi, Look at the LayerSnapModes sample. It uses ActiveMapViewChangedEvent, LayersAddedEvent and LayersRemovedEvent to populate snap list.
... View more
01-12-2024
09:04 AM
|
1
|
1
|
1677
|
|
POST
|
@KenBujais right about "async" and "await". As I understand you use SpatialAnalyst ExtractByMask tool. There is a small difference in parameters calling from python and c#, because ExtractByMask returns result raster. Calling ExtractByMask tool from c# you need to find right place for output raster path parameter. Spatial Analyst use few different approaches for output parameters: it could be in second place or last one. More info here public async Task<bool> ExtractByMask(RasterLayer _inputRaster, FeatureLayer _maskLayer, string _outRaster)
{
var valueArray = Geoprocessing.MakeValueArray(_inputRaster, _maskLayer, _outRaster);
// or
//var valueArray = Geoprocessing.MakeValueArray(_inputRaster, _outRaster, _maskLayer);
var gpResult = await Geoprocessing.ExecuteToolAsync("ExtractByMask_sa", valueArray, flags: GPExecuteToolFlags.AddOutputsToMap);
return !gpResult.IsFailed;
} I would recommend to use that overload of ExecuteToolAsync. It will get you more information about executing tool. Sample from that page: System.Threading.CancellationTokenSource _cts;
string ozone_points = @"C:\data\ca_ozone.gdb\O3_Sep06_3pm";
string[] args = { ozone_points, "OZONE", "", "in_memory\\raster", "300",
"EMPIRICAL", "300", "5", "5000",
"NBRTYPE=StandardCircular RADIUS=310833.272442914 ANGLE=0 NBR_MAX=10 SECTOR_TYPE=ONE_SECTOR",
"PREDICTION", "0.5", "EXCEED", "", "K_BESSEL" };
string tool_path = "ga.EmpiricalBayesianKriging";
_cts = new System.Threading.CancellationTokenSource();
var result = await Geoprocessing.ExecuteToolAsync(tool_path, args, null, _cts.Token,
(event_name, o) => // implement delegate and handle events
{
switch (event_name)
{
case "OnValidate": // stop execute if any warnings
if ((o as IGPMessage[]).Any(it => it.Type == GPMessageType.Warning))
_cts.Cancel();
break;
case "OnProgressMessage":
string msg = string.Format("{0}: {1}", new object[] { event_name, (string)o });
System.Windows.MessageBox.Show(msg);
_cts.Cancel();
break;
case "OnProgressPos":
string msg2 = string.Format("{0}: {1} %", new object[] { event_name, (int)o });
System.Windows.MessageBox.Show(msg2);
_cts.Cancel();
break;
}
});
var ret = result;
_cts = null; OnValidate you will get info about parameters validity.
... View more
01-10-2024
09:39 AM
|
0
|
0
|
2405
|
|
POST
|
Hi, Could you please add the code as text ("..." on toolbar and "</>" on extended toolbar)? It would be easier to correct your code.
... View more
01-10-2024
08:07 AM
|
0
|
0
|
2483
|
|
BLOG
|
I'm happy to announce that I have a new MVP rank in Esri Community today. I am glad that my contribution to the community's activities was noticed and appreciated. It took about 2 years to achieve that. I totally agree with @JesseCloutier and @BlakeTerhune thoughts. By subscribing to your favorite groups you can to know: - what are colleagues doing around a world using Esri products; - what challenges they face; - how their issues could be solved; - different approaches for same task. These knowledges can improve your work performance. Sometimes in my work I had faced issues about them I have read some time ago in posts or colleagues from community have the same issues as I had in my projects and I can share my experience. Your knowledge can improve someone else works performance too.
... View more
01-09-2024
11:49 AM
|
2
|
0
|
1644
|
|
POST
|
As I mentioned above, I have issue with database view not simple table. It worked fine in versions before 3.2. Error: The operation is not supported by this implementation. Code: using (Table viewTable = geodatabase.OpenDataset<Table>(viewName))
{
var tableDefinition = viewTable.GetDefinition();
// other code with tableDefinition
} I have attached print screen of database view properties window.
... View more
01-03-2024
11:43 PM
|
0
|
1
|
3916
|
|
POST
|
At first, we have made workaround for reading table fields from cursor instead of table definition. We decided to go back to SDK 3.1 for the same reason as you worry.
... View more
01-03-2024
06:24 AM
|
0
|
1
|
3963
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 2 weeks ago | |
| 2 | 04-24-2026 08:33 AM | |
| 1 | 03-23-2026 11:44 AM | |
| 1 | 05-22-2024 11:48 PM |
| Online Status |
Offline
|
| Date Last Visited |
Wednesday
|