Remove Feature from featureset
I need to know tools whic I can do the following
1- Remove feature at index from featureset and Then pass this featureset to GP ?
2- add features to featureset ?
Thanks,
Regards.
-
You can use the Invoke Method activity to remove a feature at a specified index, and the Add To Collection activity to add one. Alternatively, use the Remove From Collection activity, but you need a reference to the object to remove, not its index.
Example:
<Activity mc:Ignorable="sap sads" x:Class="{x:Null}" sap:VirtualizedContainerService.HintSize="280,398" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces"
xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
xmlns:eac="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client"
xmlns:eacg="clr-namespace:ESRI.ArcGIS.Client.Geometry;assembly=ESRI.ArcGIS.Client"
xmlns:eact="clr-namespace:ESRI.ArcGIS.Client.Tasks;assembly=ESRI.ArcGIS.Client"
xmlns:esri="http://schemas.esri.com/arcgis/client/2009"
xmlns:gce="clr-namespace:Geocortex.Core.Extensions;assembly=Geocortex.Core"
xmlns:gfc="clr-namespace:Geocortex.Forms.Client;assembly=Geocortex.EssentialsWpfApi"
xmlns:gfci="clr-namespace:Geocortex.Forms.Client.Items;assembly=Geocortex.EssentialsWpfApi"
xmlns:gr="clr-namespace:Geocortex.Reporting;assembly=Geocortex.Reporting"
xmlns:gwa="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"
xmlns:s="clr-namespace:System;assembly=System.Core"
xmlns:s1="clr-namespace:System;assembly=System"
xmlns:s2="clr-namespace:System;assembly=mscorlib"
xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities"
xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
xmlns:scg="clr-namespace:System.Collections.Generic;assembly=System.Core"
xmlns:scg1="clr-namespace:System.Collections.Generic;assembly=System"
xmlns:scg2="clr-namespace:System.Collections.Generic;assembly=mscorlib"
xmlns:scg3="clr-namespace:System.Collections.Generic;assembly=System.ServiceModel"
xmlns:sl="clr-namespace:System.Linq;assembly=System.Core"
xmlns:sw="clr-namespace:System.Windows;assembly=PresentationFramework"
xmlns:sw1="clr-namespace:System.Windows;assembly=WindowsBase"
xmlns:sw2="clr-namespace:System.Windows;assembly=PresentationCore"
xmlns:swt="clr-namespace:System.Windows.Threading;assembly=WindowsBase"
xmlns:swt1="clr-namespace:System.Windows.Threading;assembly=System.Windows.Presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Sequence sap:VirtualizedContainerService.HintSize="240,318" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
<Sequence.Variables>
<Variable x:TypeArguments="esri:FeatureSet" Default="[New FeatureSet]" Name="featureSet" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg2:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg2:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<AddToCollection x:TypeArguments="esri:Graphic" Collection="[featureSet.Features]" DisplayName="AddToCollection<Graphic>" sap:VirtualizedContainerService.HintSize="218,22" Item="[New Graphic]" />
<InvokeMethod DisplayName="InvokeMethod Remove feature" sap:VirtualizedContainerService.HintSize="218,132" MethodName="RemoveAt">
<InvokeMethod.TargetObject>
<InArgument x:TypeArguments="scg2:IList(esri:Graphic)">[featureSet.Features]</InArgument>
</InvokeMethod.TargetObject>
<InArgument x:TypeArguments="x:Int32">0</InArgument>
</InvokeMethod>
</Sequence>
</Activity>0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar