2

I am trying to create a model using ArcGIS ModelBuilder.

The model intends to display the attribute of the selected feature. I intend to select the feature using the 'select by location' option. However, I need to specify the input feature interactively (mouse click).

Can anyone guide which option/tool can help me select features interactively in ArcGIS?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Nov 7, 2017 at 8:44
2
  • 2
    What is your question and what have you tried? Commented Nov 7, 2017 at 8:46
  • 1
    Select it before running the model Commented Nov 7, 2017 at 8:46

2 Answers 2

2

To do this you would use a feature set:

Feature sets allow features to be entered interactively and immediately used as input to a model or script. This interactive data entry is done through a process similar to editing features inside ArcMap. Similarly, record sets allow tabular or attribute information to be entered interactively and immediately used as input.

Any tool that uses a feature class or table as input also accepts a feature or record set. This means that for any of these tools, the input can be entered interactively by building a simple model around the tool and changing the input data type from feature class or table to feature set or record set.

Once you have a feature set it should be possible to feed it into MakeFeatureLayer and then SelectLayerByLocation.

answered Nov 7, 2017 at 9:11
6
  • 1
    I think feature sets allow only drawing new features, not selecting existing features. Commented Nov 7, 2017 at 9:35
  • @GISGe "Any tool that uses a feature class or table as input also accepts a feature or record set." Commented Nov 7, 2017 at 9:42
  • Yes. It means that the digitized features are the equivalent of a feature class. As the help says, feature sets can only be used to draw features, OR to point to an existing layer (if features in this layer are already selected, the selection will be used, but you can't select interactively). Commented Nov 7, 2017 at 9:52
  • @GISGe I'm reading that differently to you and have not tested it recently to be certain. The methods in your answer and Midavalo's comment are ones that I would be more comfortable with but I think this one is worth testing. Commented Nov 7, 2017 at 11:19
  • Well I've tested feature sets in the past, that's why I can say it won't work Commented Nov 7, 2017 at 11:21
1

If you want to create a tool that interacts with your map, you will need to create an add-in for ArcMap. Python add-ins are probably the easiest if you're not a developer. Your add-in should contain a tool that will use a mouse event (click, move, draw, etc) as input. If you don't have any experience with Python and want something quickly operating, I think using a layer from the TOC as input parameter, and selecting your features in this layer like you would normally do, before running the tool (as suggested by @Midalvo), is the best option.

answered Nov 7, 2017 at 9:58
1

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.