0

I'm trying to create a tool in python where a user splits a road (a polyline feature of shapefile) and the tool automatically recalculates the road ranges depending on where it was split. I know how to have a tool access information from features selected before the tool is run, but I'm wondering, is it possible for a python script or arcMap model to prompt the user to select a feature? This functionality could make my solution to this problem much simpler.

EDIT: I didn't know that python addins existed! My foray into addins is proving to be the correct path for this venture.

asked Jul 22, 2016 at 21:34
2
  • 1
    I'd look into using a Python add-in - you've got a few more options there for interacting with users than you do with scripts/models. Commented Jul 22, 2016 at 21:56
  • I use tool validation script to deal with similar situations, i.e. tool won't run unless criteria met Commented Jul 23, 2016 at 4:30

1 Answer 1

1

I have created a toolbar with tools that do the split of the road and ranges, both using the traditional split (one road at a time) and a Planarize split (many intersecting roads selected at one time split where they intersect each other).

I just warn the user if they did not select a feature. I won't build a tool that pauses for a user to select a line rather than failing since all users of Esri should expect to select a line first and get warnings if they don't.

Anyway I have posted my toolbar on Geonet in my Blog: A Toolbar for Splitting Address Ranges and Managing Address Ranges. It helps with swapping address range values as well as splitting ranges, since you cannot split an address range until after you get the current ranges to match up with the line direction and have the parity matched on each side.

answered Jul 22, 2016 at 22:14

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.