Thread: List []

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Location
    Bristol
    Posts
    2
    Rep Power
    0

    List []


    Hi there,
    I am trying to run a process (which works fine), and I wanted to save my outputs in to a list I specified above.

    for example as below, I have run the process (is null) and I want the process to save in the is_null_list [].

    but the process is running no problem and creating the layers, but it is not saving them In the is_null_list.


    #select the variables
    straightline = "Straightline_Reclassify"
    walking = "Walking_Reclassify"
    driving = "Driving_Reclassify"
    print "Reclassify values complete"

    #create list to be edited
    mylist = [straightline, driving, walking]

    #Set all the areas that have no value, to have a value
    is_null_list =[]
    for feature in mylist:
    null_feature = arcpy.gp.IsNull_sa(feature, feature + "Null")
    is_null_list.append(null_feature)




    thank you Hannah
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Location
    39N 104.28W
    Posts
    158
    Rep Power
    3
    Originally Posted by hannahkh22
    Hi there,
    I am trying to run a process (which works fine), and I wanted to save my outputs in to a list I specified above.

    for example as below, I have run the process (is null) and I want the process to save in the is_null_list [].

    but the process is running no problem and creating the layers, but it is not saving them In the is_null_list.
    You need to post more of the code and with code tags. At first glance, it seems that arcpy.gp.isnull_sa() isn't returning a value.
  4. #3
  5. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,837
    Rep Power
    480
    python functions and methods all return a value.
    [code]Code tags[/code] are essential for python code and Makefiles!
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Location
    Bristol
    Posts
    2
    Rep Power
    0
    the Is null process is working and creating an output on ArcMap, but when I append it does not seem to be going in to the list :S.

    I can't seem to figure out my.

    - if I was to for example with just number or words it works fine. I don't know if it is because I am trying to do a process?

IMN logo majestic logo threadwatch logo seochat tools logo