Enable snapping in workflow
Hi I am using Multipoint tool in DisplayCaptureGeometry to select multiple line features.
However a number of features are being missed out from getting selected.
, hence rather than asking the user to click shift-F for snapping, I would like to enable snapping automatically when initialising workflow or when clicking on the tool.
Is this feasible?
0
-
If I am not mistaken you can add the RunExternalCommand activity and then add the "ActivateSnapping" command in the Command name field - at the beginning of your workflow and then if required near the end of the workflow add another RunExternalCommand activity and use "DeactivateSnapping" command to terminate snapping.
Best regards,
Terry0 -
I was able to enable snapping by having the workflow activate the "F" shortcut key (workflow shown below) <Activity mc:Ignorable="sads sap sap2010" x:Class="ActivityBuilder" mva:VisualBasic.Settings="{x:Null}" sap2010:WorkflowViewState.IdRef="ActivityBuilder_1" 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:gcx="http://apis.geocortex.com/2009" 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: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:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <TextExpression.NamespacesForImplementation> <sco:Collection x:TypeArguments="x:String"> <x:String>System.Activities</x:String> <x:String>System.Activities.Statements</x:String> <x:String>System.Activities.Expressions</x:String> <x:String>System.Activities.Validation</x:String> <x:String>System.Activities.XamlIntegration</x:String> <x:String>ESRI.ArcGIS.Client</x:String> <x:String>ESRI.ArcGIS.Client.Geometry</x:String> <x:String>ESRI.ArcGIS.Client.Tasks</x:String> <x:String>Geocortex.Core.Extensions</x:String> <x:String>Geocortex.Workflow.Activities</x:String> <x:String>Geocortex.Forms.Client</x:String> <x:String>Geocortex.Forms.Client.Items</x:String> <x:String>Geocortex.Reporting</x:String> <x:String>System</x:String> <x:String>Microsoft.VisualBasic.Activities</x:String> <x:String>System.Collections.Generic</x:String> <x:String>System.Linq</x:String> <x:String>System.Windows.Markup</x:String> </sco:Collection> </TextExpression.NamespacesForImplementation> <TextExpression.ReferencesForImplementation> <sco:Collection x:TypeArguments="AssemblyReference"> <AssemblyReference>System.Activities</AssemblyReference> <AssemblyReference>ESRI.ArcGIS.Client</AssemblyReference> <AssemblyReference>Geocortex.Core</AssemblyReference> <AssemblyReference>Geocortex.Workflow</AssemblyReference> <AssemblyReference>Geocortex.EssentialsWpfApi</AssemblyReference> <AssemblyReference>Geocortex.Reporting</AssemblyReference> <AssemblyReference>System.Core</AssemblyReference> <AssemblyReference>System</AssemblyReference> <AssemblyReference>mscorlib</AssemblyReference> <AssemblyReference>PresentationFramework</AssemblyReference> <AssemblyReference>WindowsBase</AssemblyReference> <AssemblyReference>PresentationCore</AssemblyReference> <AssemblyReference>System.Xaml</AssemblyReference> </sco:Collection> </TextExpression.ReferencesForImplementation> <Sequence sap2010:WorkflowViewState.IdRef="Sequence_1" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces"> <Sequence.Variables> <Variable x:TypeArguments="esri:Geometry" Name="geometry1" /> <Variable x:TypeArguments="x:String" Name="btnResult" /> </Sequence.Variables> <gwa1:DisplayCaptureGeometry AutoSubmit="{x:Null}" CaptureTypes="{x:Null}" DefaultCaptureType="{x:Null}" GraphicsLayerName="{x:Null}" ButtonResultValue="[btnResult]" CustomGeometryInstructions="Press the F key to snap to a road" DefaultCaptureTypePlaceholder="Polyline" GeometryRequired="True" sap2010:WorkflowViewState.IdRef="DisplayCaptureGeometry_1" RequiredMessage="Please geom" Result="[geometry1]" ShowCapturedGeometry="True" ShowCapturedMessage="True" WorkflowContainerName="DataRegion"> <gwa1:DisplayCaptureGeometry.Buttons> <gcx:FormButton CausesValidation="True" IsDefault="True" Label="Button" Value="btnValue" /> </gwa1:DisplayCaptureGeometry.Buttons> <gwa1:DisplayCaptureGeometry.CaptureTypesPlaceholder> <scg:List x:TypeArguments="gwa1:GeometryCaptureType" Capacity="4"> <gwa1:GeometryCaptureType>Polyline</gwa1:GeometryCaptureType> </scg:List> </gwa1:DisplayCaptureGeometry.CaptureTypesPlaceholder> </gwa1:DisplayCaptureGeometry> <gwa1:RunExternalCommand CommandName="vbkeyF" sap2010:WorkflowViewState.IdRef="RunExternalCommand_2" /> <sads:DebugSymbol.Symbol>d1VDOlxVc2Vyc1xBcm1lZFdpdGh0aGVXb3JkXERvY3VtZW50c1xXb3JrXEdlb2NvcnRleFxXb3JrZmxvd3NcRGV2ZWxvcG1lbnRcc25hcHBpbmcudHh0DEIDUw4CAQFHBVAjAgEEUQVRbAIBAkfGAUfpAQIBDkfmA0fyAwIBDUedAUeqAQIBC0euA0e0AwIBCkfJA0fPAwIBCUeLA0eYAwIBB0f2AkeDAwIBBkekAkeqAgIBBVEqUTICAQM=</sads:DebugSymbol.Symbol> </Sequence> <sap2010:WorkflowViewState.ViewStateManager> <sap2010:ViewStateManager> <sap2010:ViewStateData Id="DisplayCaptureGeometry_1" sap:VirtualizedContainerService.HintSize="351,536" /> <sap2010:ViewStateData Id="RunExternalCommand_2" sap:VirtualizedContainerService.HintSize="351,86" /> <sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="373,786"> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsExpanded">True</x:Boolean> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> </sap2010:ViewStateData> <sap2010:ViewStateData Id="ActivityBuilder_1" sap:VirtualizedContainerService.HintSize="413,866" /> </sap2010:ViewStateManager> </sap2010:WorkflowViewState.ViewStateManager> </Activity>0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
2 kommentarer