0

sorry for the changes but this is the overview of my problem

I'm using 10.2.2 arcgis

I have a geodatabase that every day enter new feature class I want to create a tool that lists all the feature class I and through a checkbox feature class I decide 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

  • Sounds like you want to be using an Iterator have a look at the help file here. – Hornbydd Nov 5 '14 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. – Beck Nov 5 '14 at 20:32
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.

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.