convert ilist<graphic> to featureset
how can i convert an ilist<graphic> which is the result of intersect to a featureset, which i will need to convert to a datatable.
J
-
Hi Jeff,
I believe a FeatureSet is actually an IEnumerable<Graphic> so youshould be able to use an iList directly.
_img_ alt="" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907600000000NYk&feoid=Body&refid=0EM60000000DDfb"_/_img_
0 -
yes thats right, so how would you loop through an ilist object and get the attributes for each item?
0 -
Hi Jeff
why not leave it as a FeatureSet and then use a ForEach loop where Graphic is the object type being iterated over.
<Activity mc:Ignorable="sap sads" x:Class="{x:Null}" sap:VirtualizedContainerService.HintSize="344,530" 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:gwa1="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow.Activities"
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:s3="clr-namespace:System;assembly=System.ComponentModel.Composition"
xmlns:s4="clr-namespace:System;assembly=System.Reactive.Core"
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: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:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Sequence sap:VirtualizedContainerService.HintSize="304,450" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
<Sequence.Variables>
<Variable x:TypeArguments="scg2:IList(esri:Graphic)" Name="iList1" />
</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>
<Assign sap:VirtualizedContainerService.HintSize="282,59">
<Assign.To>
<OutArgument x:TypeArguments="scg2:IList(esri:Graphic)">[iList1]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="scg2:IList(esri:Graphic)">[new List(of Graphic)]</InArgument>
</Assign.Value>
</Assign>
<ForEach x:TypeArguments="esri:Graphic" DisplayName="ForEach<Graphic>" sap:VirtualizedContainerService.HintSize="282,227" Values="[iList1]">
<ActivityAction x:TypeArguments="esri:Graphic">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="esri:Graphic" Name="item" />
</ActivityAction.Argument>
<gwa1:Alert sap:VirtualizedContainerService.HintSize="211,82" Text="[item.Attributes("theAttribName").ToString]" />
</ActivityAction>
</ForEach>
</Sequence>
</Activity>How are you making the ilist<Graphic>?
Regards
Ralph
0 -
yes this will work for me, i just needed an example. thank you!
Jeff
0 -
Hi Ralph Price,
Is your suggestion workfllow is valid for ilist of type sting, please have allok in my post here (https://support.geocortex.com/essentialsGSCForum?id=906f20000000CLCAA2).
Thank you in advance
Best,
Majdoleen0
Please sign in to leave a comment.
Comments
5 comments