Select to view content in your preferred language

How to draw a line parallel to the existing line segment

941
4
Jump to solution
07-08-2021 06:24 AM
SashiRekha
Emerging Contributor

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
by Anonymous User
Not applicable

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
4 Replies
GKmieliauskas
Esri 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
by Anonymous User
Not applicable

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.

0 Kudos
SashiRekha
Emerging Contributor

Hi @Anonymous User ,

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
BrettWaddingham
Emerging Contributor

This post is a year old, has there been any progress with sketch constraints being available in the SDK?  Could come in super handy!

0 Kudos