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.

  • 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. – Kevin Jul 22 '16 at 21:56
  • I use tool validation script to deal with similar situations, i.e. tool won't run unless criteria met – FelixIP Jul 23 '16 at 4:30
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.