How to draw a line parallel to the existing line segment

227
3
Jump to solution
07-08-2021 06:24 AM
SashiRekha
New Contributor II

Hi,

We are developing a customized tool using ArcGIS Pro SDK (v2.8) and .NET Framework. The problem statement is that we need to create a line parallel to the existing line segment (similar to Parallel context menu item) as shown below

SashiRekha_0-1625747604207.png

Any inputs/ideas are most appreciated

 

0 Kudos
1 Solution

Accepted Solutions
SeanJones
Esri Regular Contributor

Hi,

How would you like this to work from the users perspective? You mention 'similar to the parallel constraint' in the UI, are you looking to set an angular and or distance constraint on the sketch feedback or just create the next sketch segment from some geometry?

Unfortunately the sketch constraints aren't exposed in the SDK on the sketchtool currently but its 'on the list'. The alternative, which isn't quite the same, is to add a geometry that you calculate onto the existing sketch via GetCurrentSketchAsync and SetCurrentSketchAsync.

View solution in original post

0 Kudos
3 Replies
GintautasKmieliauskas
Regular Contributor

Hi,

You can try to use GeometryEngine Move functionality 

https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic8262.html 

But you need to calculate x, y for your moving

0 Kudos
SeanJones
Esri Regular Contributor

Hi,

How would you like this to work from the users perspective? You mention 'similar to the parallel constraint' in the UI, are you looking to set an angular and or distance constraint on the sketch feedback or just create the next sketch segment from some geometry?

Unfortunately the sketch constraints aren't exposed in the SDK on the sketchtool currently but its 'on the list'. The alternative, which isn't quite the same, is to add a geometry that you calculate onto the existing sketch via GetCurrentSketchAsync and SetCurrentSketchAsync.

View solution in original post

0 Kudos
SashiRekha
New Contributor II

Hi @SeanJones ,

I'm looking to get an angular constraint from the sketch feedback when the user selected Parallel Context Menu. Thanks for confirming that it is on the list. 

Since the sketch constraints are not available in the SDK, I am trying to create a line parallel to the existing line segment, where the direction of line (right/ left side) depends on cursor point relative to the first point. (Or) Is there any possibility to determine the selected context menu item?

0 Kudos