|
POST
|
You could try to call python script with your workflow from CoreHost application or execute python script directly. We have similar situation with geoprocessing in CoreHost application. There is no way to call geoprocessing tool directly, but you can call it from python.
... View more
11-20-2024
09:10 AM
|
0
|
1
|
2636
|
|
POST
|
Hi,
If I understand correctly, you are talking about the AnimationCurve and duration which are available when you set viewpoint from code. For internal calls of setting viewpoint there is no such interaction parameters, I think.
... View more
11-20-2024
08:45 AM
|
0
|
0
|
2042
|
|
POST
|
Sorry @CarlosPiccirillo2 .
Project class belongs to ArcGIS.Desktop.Core workspace which is not accessible from CoreHost application. ArcGIS.CoreHost and ArcGIS.Core assemblies are available from Corehost application only. More information here.
... View more
11-20-2024
08:25 AM
|
0
|
0
|
2644
|
|
POST
|
Hi,
You could use Row.Store method without EditOperation callback only in OnRowChangedEvent implementation. More information here. There are not so many cases which need Store using.
... View more
11-20-2024
08:06 AM
|
0
|
2
|
1092
|
|
POST
|
Hi,
Project.OpenAsync returns Task<Project>. So, to assign result of Project.OpenAsync to Project variable, you need to use await before Project.OpenAsync. Your method could look like code below:
public static async Task<Project> GetProject()
{
try
{
string aprxFile = PATH_Aprx_template + "exhibit_map.aprx";
// Open the project
Project project = await Project.OpenAsync(aprxFile);
// Check if the project is null (failed to open)
if (project == null)
{
Console.WriteLine("Failed to open the project.");
return null;
}
return project;
}
catch (Exception ex)
{
Console.WriteLine($"Error in GetProject: {ex.Message}");
return null;
}
}
... View more
11-14-2024
09:16 AM
|
0
|
2
|
2732
|
|
POST
|
Hi,
There is no need to use QueuedTask.Run. GetPlugInWrapper doesn't need MCT thread
protected override void OnClick()
{
// ArcGIS Pro Command's DAML ID.
var commandId = "esri_editing_DivideCommand";
// get the ICommand interface from the ArcGIS Pro Button
// using command's plug-in wrapper
var iCommand = FrameworkApplication.GetPlugInWrapper(commandId) as ICommand;
if (iCommand != null)
{
// Let ArcGIS Pro do the work for us
if (iCommand.CanExecute(null))
{
iCommand.Execute(null);
MessageBox.Show("Any custom code written here executes without waiting for the user to divide a polyline");
}
}
MessageBox.Show("iCommand is done");
}
... View more
11-08-2024
07:10 AM
|
0
|
1
|
2071
|
|
POST
|
Hi,
Declaration of your method must be:
public static Task<long> GetContainedLegOid(FeatureLayer MapMember, Geometry shape, Int64 faid, string startEnd)
Call to you method:
var oid = await GetContainedLegOid(mapMember, shape, faid, startEnd);
It is not good idea to use MessageBox inside QueuedTask.Run. For example, you can return -oid and check value after calling your method:
var oid = await GetContainedLegOid(mapMember, shape, faid, startEnd);
if(oid == 0) {
MessageBox.Show(string.Format("{0} NodeLeg of rdsmall arc with FAID = {1} not found", startEnd, faid));
}
else {
if(oid < 0) {
MessageBox.Show(string.Format("Multiple NodeLegs found, check results"));
oid = -oid;
}
}
... View more
11-07-2024
10:19 PM
|
0
|
0
|
816
|
|
POST
|
Hi,
Try to subscribe to ArcGIS.Desktop.Layouts.Events.LayoutViewEvent and check args.Hint == LayoutViewEventHint.DrawingComplete. LayoutViewEventHint Enumeration here.
... View more
11-07-2024
04:53 AM
|
0
|
0
|
2680
|
|
POST
|
Hi,
There is no difference between the databases you are going to edit from ArcGIS Pro add-in developer side. Take a look at these links: ArcGIS Pro ProConcepts:Editing and video from Esri developer session. It will let you understand editing in ArcGIS Pro SDK.
... View more
11-06-2024
10:20 PM
|
0
|
0
|
636
|
|
POST
|
Hi,
I had similar issue. After some investigation I have found that it couldn't be only distance issue. Sometimes it works on longer paths and doesn't on shorter. I noticed what it could be dependent on restricted paths for walking (highways and etc.) If it is possible to find a way that for example can cross highway but not goes along highway and distance is longer (but not so much) then it creates route. Otherwise it returns exception. So it depends on not only distance but and other network parameters.
... View more
10-31-2024
07:59 AM
|
0
|
0
|
717
|
|
POST
|
I think, you can't select template directly from Create Features pane. But your workflow could be like in sample below:
protected async override void OnClick()
{
await QueuedTask.Run(() =>
{
// Find layer you will work with
var featLayer = MapView.Active.Map.FindLayers("Poly1").First();
// Get all templates and then select template you need or use GetTemplate if you know template name
var editTemplates = featLayer.GetTemplates();
if (editTemplates != null && editTemplates.Count > 0)
{
var editTemplate = editTemplates[0];
// Activate default tool
editTemplate.ActivateDefaultToolAsync();
}
});
}
... View more
10-30-2024
07:44 AM
|
1
|
0
|
1967
|
|
POST
|
Yes. Documentation says that first parameter must be file or folder:
Name
Explanation
Data Type
in_data
[in_data,...]
The folders containing the data files or the data files to convert to geodatabase feature classes.
Folder; File
... View more
10-29-2024
12:10 PM
|
0
|
0
|
3134
|
|
POST
|
Hi,
I think these links could help you: https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-change-background-color-of-rectangular/m-p/1030564#M6255
https://community.esri.com/t5/arcgis-pro-sdk-questions/trying-to-change-the-fill-color-of-a/m-p/1505192
... View more
10-28-2024
11:39 PM
|
0
|
0
|
1508
|
|
POST
|
Hi,
Change Stackpanel to Grid:
<Grid Grid.Row="1">
<ContentPresenter Content="{Binding CurrentPage}"></ContentPresenter>
</Grid>
Stackpanel has some limitations
... View more
10-28-2024
08:29 AM
|
0
|
0
|
1316
|
|
POST
|
Hi,
Use GetPlugInWrapper Method—ArcGIS Pro. To find tool reference id move mouse over the tool.
... View more
10-28-2024
08:14 AM
|
1
|
3
|
1992
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 4 weeks ago | |
| 1 | 03-23-2026 11:44 AM | |
| 1 | 05-22-2024 11:48 PM | |
| 1 | 02-27-2026 10:33 AM | |
| 1 | 01-07-2026 10:44 AM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|