0

I have a geodatabase that every day enter new feature class. I want to create a tool that lists all the feature classes and, through a checkbox, can decide which feature class to be added to my dataframe.

Currently I have the following script:

import arcpy
import os
arcpy.env.workspace = "C:/Users/Usuario/Documents/Modelo Geomarketing/base/Infomacion.gdb"
datasets = arcpy.ListDatasets(feature_type='feature')
datasets = [''] + datasets if datasets is not None else []
for ds in datasets:
 for fc in arcpy.ListFeatureClasses(feature_dataset=ds):
 path = os.path.join(arcpy.env.workspace, ds, fc)
 print path

#results

C:/Users/Usuario/Documents/Modelo Geomarketing/base/Infomacion.gdb\Datos\Buses C:/Users/Usuario/Documents/Modelo Geomarketing/base/Infomacion.gdb\Datos\Gasolineras C:/Users/Usuario/Documents/Modelo Geomarketing/base/Infomacion.gdb\Datos\Bancos

I want to know what changes to make to add to my data frame by Means a checkbox feature class result, using ArcGIS 10.2.2.

Keggering
1,1371 gold badge8 silver badges27 bronze badges
asked Nov 5, 2014 at 20:10
2
  • Sounds like you want to be using an Iterator have a look at the help file here. Commented Nov 5, 2014 at 20:28
  • 1
    I'm confused about whether you want to use python (as indicated by your title) or model builder (as indicated in your post). But if using python check out the arcpy module, particularly ListFeatureClasses and AddLayer. Commented Nov 5, 2014 at 20:32

1 Answer 1

3

A check box means user interaction so you will need to look at using either a Python script tool / Python toolbox or a Python Add-in. What you are actually needing is called a value table. Have a look at this link in the help doco.

answered Nov 6, 2014 at 0:19

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.