Where can I find information on how to create a custom command to draw a line?

685
4
Jump to solution
11-09-2017 01:16 PM
JamesLatham
New Contributor

 I would like to be able to click on a starting point, and ending point and have a line drawn between those 2 points that is offset at a distance between the 2 points (10') and angles into the starting point at 45 degrees.

0 Kudos
1 Solution

Accepted Solutions
JosephMarsh1
New Contributor III

Hey James,

This does clarify things. Thank you.  I would start by looking at the ArcGIS API for Python Guide.  In the API reference, there is a section on geometry and then offsets. arcgis.geometry module — arcgis 1.2.4 documentation

The angle into the starting point could be accomplished with some trig.  Esri has a geonet community for the ArcGIS API for Python at Python .  You will find people there who are more skilled in customization.

If I find more resources, I will let you know.

Sincerely,

Joe

View solution in original post

0 Kudos
4 Replies
JosephMarsh1
New Contributor III

Hey James,

Will you provide some background to the workflow this is aimed for? 

Thanks,

Joe

0 Kudos
JamesLatham
New Contributor

Joe,

      I work for an electric utility. In our GIS, we draw our primary (high voltage) overhead conductor by simply snapping it to each pole (the green circles in the screenshot from my original post). When we draw our secondary (low voltage) conductor, we offset that conductor by a distance of 10' from the primary conductor for visual clarity. In the screenshot from my original post there is no primary overhead conductor but we would still draw the secondary conductor with the same 10' offset. Angling into the pole of origin at 45 degrees allows us to easily see where the line begins.

    I am currently using a combination of segment deflection (to create the 45 degree angle) and the "trace" tool to create the offset. This is working fine but I would like to find out how to create a custom command to make the process easier. Maybe scripting a command in python or in visual basic (I have little experience in either of these)?

I hope this helps clarify things and thanks for your interest,

James

0 Kudos
JamesLatham
New Contributor

Joe,

Thanks for interest. I posted this same reply on GeoNet but I thought I’d also reply to this email for your convenience……

Joe,

I work for an electric utility. In our GIS, we draw our primary (high voltage) overhead conductor by simply snapping it to each pole (the green circles in the screenshot from my original post). When we draw our secondary (low voltage) conductor, we offset that conductor by a distance of 10' from the primary conductor for visual clarity. In the screenshot from my original post there is no primary overhead conductor but we would still draw the secondary conductor with the same 10' offset. Angling into the pole of origin at 45 degrees allows us to easily see where the line begins.

I am currently using a combination of segment deflection (to create the 45 degree angle) and the "trace" tool to create the offset. This is working fine but I would like to find out how to create a custom command to make the process easier. Maybe scripting a command in python or in visual basic (I have little experience in either of these)?

I hope this helps clarify things and thanks for your interest,

James

0 Kudos
JosephMarsh1
New Contributor III

Hey James,

This does clarify things. Thank you.  I would start by looking at the ArcGIS API for Python Guide.  In the API reference, there is a section on geometry and then offsets. arcgis.geometry module — arcgis 1.2.4 documentation

The angle into the starting point could be accomplished with some trig.  Esri has a geonet community for the ArcGIS API for Python at Python .  You will find people there who are more skilled in customization.

If I find more resources, I will let you know.

Sincerely,

Joe

0 Kudos