Create a tool to split rectangles

817
5
04-09-2018 09:48 PM
UtkarshSharma
New Contributor

Hi,

I want to create a tool which splits rectangles on the basis of clicks.

In the below rectangle, x denotes the click location.

|-----------------------------|

|        x                         |

|-----------------------------|

Output:

|------ |----------------------|

|        |                           |

|-------|----------------------|

I'm completely new to ArcGIS Pro SDK, so would like to know whether it is even possible to create a tool with such functionality.

If it is possible, I will be very grateful if someone can guide me on how to proceed with creating such a tool.

0 Kudos
5 Replies
DanPatterson_Retired
MVP Emeritus

Have you seen the ArcGIS Pro SDK documentation?

https://pro.arcgis.com/en/pro-app/sdk/

0 Kudos
UtkarshSharma
New Contributor

Yes, but going through the available tutorials only provides an introductory overview of the ArcGIS Pro SDK. I was hoping that someone with experience will point me to the relevant parts of the SDK for implementing the said functionality.

0 Kudos
UmaHarano
Esri Regular Contributor

Hi Sarthak,

Please check out this sample, 

https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Editing/SketchToolDemo 

This sample demonstrates a 'cut' tool that allows an editor to sketch a line over a set of existing features, if a polygon is intersected by the sketch line, the polygon will be cut by the sketched line.

Thanks

Uma

0 Kudos
MaxPayson
Esri Contributor

Hi Sarthak and Uma,

Quick update, the sample is available here:

https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Editing/SketchToolDemo 

Thanks,

-Max

0 Kudos
UtkarshSharma
New Contributor

Thanks for the sample, going through the sample code provided a good overview of some of the functionalities in the SDK. Few follow-up questions:

- Is it possible to access the edges of the polygon which were intersected by the line geometry?

- Can we also obtain length of the edges of polygon geometry?

- Can the line geometry be translated by a certain distance (the translated line will be parallel to the original line)?

0 Kudos