This sample illustrates how to build a construction tool with options allowing users to provide parameters at run-time.
Two samples are included.
The first is the BufferedLineTool. The line sketch geoemtry is buffered by a user defined distance to create a polygon feature.
The second sample is the CircleTool. A user defined radius is used to create a circular arc with the point sketch geometry as the centroid. This tool is registered with both the esri_editing_construction_polyline and esri_editing_construction_polygon categories allowing both polyline and polygon features to be created.
The CircleTool options follows the multiple tool options pattern (implementing ToolOptionsEmbeddableControl) allowing the users to select multiple templates in the manage templates dialog and change tool option values for those templates. The BufferedLineTool sample follows the single use pattern.
Language: C#
Subject: Editing
Contributor: ArcGIS Pro SDK Team <arcgisprosdk@esri.com>
Organization: Esri, https://www.esri.com
Date: 11/04/2024
ArcGIS Pro: 3.4
Visual Studio: 2022
.NET Target Framework: net8.0-windows
- Sample data for ArcGIS Pro SDK Community Samples can be downloaded from the Releases page.
- Download the Community Sample data (see under the 'Resources' section for downloading sample data)
- Make sure that the Sample data is unzipped in c:\data
- The project used for this sample is 'C:\Data\FeatureTest\FeatureTest.aprx'
- In Visual Studio click the Build menu.Then select Build Solution.
- Launch the debugger to open ArcGIS Pro.
- ArcGIS Pro will open, select the FeatureTest.aprx project
- Select the 'Edit' tab on the ArcGIS Pro ribbon and 'Create' new features
- On the 'Create Features' pane select the test polygon feature layer to see the 'Buffered Line' tool
- Select the tool and see the Options page displaying the buffer distance
- Enter a buffer distance and sketch a line.See a buffer of the sketched line used to generate a new polygon feature.
Home | API Reference | Requirements | Download | Samples