|
POST
|
Hi, All available icons here Your icon is GenericInformation16.png or GenericInformation32.png
... View more
08-21-2023
02:08 AM
|
0
|
0
|
1403
|
|
POST
|
Hi, If I understand you right, you want to call function from commented area. So you could do it using Action or Func delegate. Below is sample with Action delegate: static void MyFunction(double param1)
{
Console.WriteLine($"Parameter: {param1}");
}
// Add an Action delegate as a parameter
public void AggregateMethod(Action<double> action)
{
QueuedTask.Run(() =>
{
FeatureClassDefinition IntersectSortDef = IntersectSort.GetDefinition();
QueryFilter qF = new QueryFilter { WhereClause = $@"{FieldName} = {UniqueID}" };
using (var rowCursor = IntersectSort.Search(qF, false))
{
while (rowCursor.MoveNext())
{
using (Row row = rowCursor.Current)
{
var rArea = row["Shape_Area"];
// Invoke the passed action
action(rArea);
}
}
}
});
}
// Usage example
AggregateMethod(MyFunction); If you want to return value from function use Func delegate: static bool MyFunction(double param1)
{
Console.WriteLine($"Parameter: {param1}");
return param1 > 0;
}
// Add an Action delegate as a parameter
public void AggregateMethod(Func<double, bool> func)
{
QueuedTask.Run(() =>
{
FeatureClassDefinition IntersectSortDef = IntersectSort.GetDefinition();
QueryFilter qF = new QueryFilter { WhereClause = $@"{FieldName} = {UniqueID}" };
using (var rowCursor = IntersectSort.Search(qF, false))
{
while (rowCursor.MoveNext())
{
using (Row row = rowCursor.Current)
{
var rArea = row["Shape_Area"];
// Invoke the passed action
bool retVal = func(rArea);
}
}
}
});
}
// Usage example
AggregateMethod(MyFunction);
... View more
08-17-2023
02:03 AM
|
1
|
0
|
1346
|
|
POST
|
Hi, Try to change all places where you use "<Null>" to null
... View more
08-15-2023
12:34 AM
|
0
|
0
|
965
|
|
POST
|
If you are using EditOperation set your EditOperation EventToken for further checking in EditCompletedEvent EventToken. // in your MapTool class
SubscriptionToken _yourOperationEventToken = null;
// in subscribe to EditCompletedEvent place
_yourOperationEventToken = EditCompletedEvent.Subscribe(onEditCompleted);
// in create EditOperation place
EditOperation op = new EditOperation();
op.EventToken = _yourOperationEventToken; private Task OnEditCompleted(EditCompletedEventArgs args)
{
switch (args.CompletedType)
{
case EditCompletedType.Save:
break;
case EditCompletedType.Discard:
if(args.EventToken == _yourOperationEventToken) {
// your tool operation discarded
}
break;
case EditCompletedType.Operation:
break;
case EditCompletedType.Undo:
case EditCompletedType.Redo:
break;
case EditCompletedType.Reconcile:
break;
case EditCompletedType.Post:
break;
default:
throw new ArgumentOutOfRangeException();
}
}
... View more
08-11-2023
03:28 AM
|
0
|
0
|
1753
|
|
POST
|
Hi, Your tool pattern seems to be too complex. I suggest you to write your own tool for map selection using MapTool or EmbeddableControl. Take a look to that thread
... View more
08-11-2023
02:11 AM
|
0
|
2
|
1760
|
|
POST
|
Hi, You could try the code below (without await): protected override void OnClick()
{
string installPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
string toolboxPath = Path.Combine(installPath, "toolbox.pyt\\Tool");
Geoprocessing.ExecuteToolAsync(toolboxPath,null,null,null,null, GPExecuteToolFlags.InheritGPOptions);
}
... View more
08-07-2023
11:57 AM
|
0
|
1
|
2339
|
|
POST
|
Hi, You need call layout.Export(pdf) on the MCT. It means , it must be enclosed in QueuedTask.Run. //Check to see if the path is valid and export
if (pdf.ValidateOutputFilePath())
{
await QueuedTask.Run(() =>
{
layout.Export(pdf); //Export the PDF
});
}
... View more
08-03-2023
01:07 PM
|
0
|
1
|
2214
|
|
POST
|
Your code is very complicated. Try code below: QueryFilter qf = new QueryFilter();
qf.SubFields = "FACILITYID";
qf.WhereClause = "FACILITYID = '" + shpFacilityID + "'";
var modifyTable = new ArcGIS.Desktop.Editing.EditOperation();
modifyTable.Name = "Update HYDINSP Table";
using (var rowCursor = inspFile.Search(qf))
{
while (rowCursor.MoveNext())
{
using (var row = rowCursor.Current)
{
modifyTable.Modify(row, "FACILITYID", sdeFacilityID);
}
}
}
modifyTable.Execute(); Modify method help I have made changes of your code directly in community editor and haven't tested it.
... View more
07-27-2023
12:01 PM
|
0
|
0
|
2811
|
|
POST
|
As I mentioned I have added QueuedTask.Run and changed field name corresponding my dbf file.
... View more
07-27-2023
11:55 AM
|
0
|
0
|
2811
|
|
POST
|
Hi, Standalone table has different Search method parameters than Table or FeatureClass. More info here: https://pro.arcgis.com/en/pro-app/2.9/sdk/api-reference/index.html#topic12260.html What type of error do you get on row Store? System.NotSupportedException or GeodatabaseException? On ArcGIS Pro 3.1.2 your code works if Search section is included into QueuedTask.Run.
... View more
07-26-2023
10:40 PM
|
0
|
4
|
2839
|
|
POST
|
Hi, Does your custom dock pane contain only "ScrollViewer" type control? If yes, I think, it is enough to have only grid in it: <Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<mappingControls:LocatorControl Grid.Row="0" Margin="3">
<behaviors:Interaction.Triggers>
<behaviors:EventTrigger EventName="SelectedGeocodeResultsChanged">
<behaviors:InvokeCommandAction Command="{Binding SelectedGeocodeResultsChangedCommand}" PassEventArgsToCommand="True" />
</behaviors:EventTrigger>
</behaviors:Interaction.Triggers>
</mappingControls:LocatorControl>
<Label Grid.Row="1" Margin="3" Content="" />
<StackPanel Grid.Row="2" Margin="6,2">
<RadioButton Margin="3,3" Content="" />
<RadioButton Margin="3,3" Content="" />
<Button Margin="0,20,3,3" HorizontalAlignment="Right" Command="{Binding SearchCommand}" Content="Search" Style="{DynamicResource Esri_Button}" />
</StackPanel>
</Grid> I have change grid row definitions first with last. Now in ArcGIS Pro GeocodingTools sample it looks like in picture below:
... View more
07-26-2023
04:19 AM
|
0
|
5
|
3331
|
|
POST
|
Hi, You can use python.exe to call GP tools like Register as versioned from CoreHost application
... View more
07-25-2023
07:12 AM
|
1
|
1
|
1748
|
|
POST
|
Hi, Try code below: await QueuedTask.Run(() =>
{
map = MapFactory.Instance.CreateMap(new Uri(mapxPath));
});
await ProApp.Panes.CreateMapPaneAsync(map); or await QueuedTask.Run(async() =>
{
map = MapFactory.Instance.CreateMap(new Uri(mapxPath));
await ProApp.Panes.CreateMapPaneAsync(map);
});
... View more
07-24-2023
10:31 PM
|
0
|
1
|
1970
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Thursday | |
| 1 | Tuesday | |
| 1 | 4 weeks ago | |
| 1 | a month ago | |
| 2 | 04-24-2026 08:33 AM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|