0

I get 'parameters are not valid' error (see detailed error message below), when I try to execute arcpy.CreateTin_3d() function (code below)

Error I get:

Failed to execute. Parameters are not valid.

ERROR 000800: The value is not a member of .

ERROR 000800: The value is not a member of .

Failed to execute (CreateTin).

Code:

def createTIN():
    try:
        arcpy.AddMessage("You clicked OK")
        shift_tin_source = "C:\\Data\\Interacting with Maps\\Interacting with Maps.gdb\\shift_tin_source"
        shift_dx = "C:\\Data\\Interacting with Maps\\shift_dx"
        # Coordinate System

        table_created = arcpy.CreateTin_3d(shift_dx, "", shift_tin_source+" dx masspoints", "DELAUNAY")
        arcpy.AddMessage("You clicked OK1")
        print ("DX tin created")

    except Exception as ex:
        print ("Exception occurred!" + str(ex))
        print (arcpy.GetMessages())

I also tried below different version of passing argument to CreateTin function.

table_created = arcpy.CreateTin_3d(shift_dx, None, shift_tin_source+" dx masspoints None", "DELAUNAY")

and

table_created = arcpy.CreateTin_3d(shift_dx, None, shift_tin_source+" dx masspoints None", "DELAUNAY")
  • Your spatial reference shouldn't be None. You can get the spatial reference for a feature class using arcpy.Describe resources.arcgis.com/en/help/main/10.2/index.html#/… like desc = arcpy.Describe(shift_tin_source) then put desc.spatialReference into the create tin process. I would also suggest not to have spaces in the path to the TIN... TIN datasets are historically old, like coverages and GRIDs and don't like spaces or punctuation in their path. – Michael Stimson Jul 7 '17 at 3:18
  • 2
    I think you will find it far easier to spot what is astray by removing your try/except statement while testing, and when presenting code snippets here. They can mask the errors that Python provides and the line number that they occur on which would help us. – PolyGeo Jul 7 '17 at 3:20
  • This is the line arcpy.CreateTin_3d(shift_dx, "", shift_tin_source+" dx masspoints", "DELAUNAY"), which creates this error. – Jadav Bheda Jul 7 '17 at 5:27
0

Below code worked for me. (May it helps someone having similar error).

def createTIN():
    try:
        projHome = sys.argv[1] # path to project home directory

        shift_tin_source = os.path.join(projHome,"shift_tin_source")
        shift_dx = os.path.join(projHome,"shift_dx")
        shift_dy = os.path.join(projHome,"shift_dy")

        # Coordinate System
        desc = arcpy.Describe(shift_tin_source)
        projection = desc.spatialReference

        arcpy.ddd.CreateTin(shift_dx, 
                            projection,
                            shift_tin_source+" dx Mass_Points dx", 
                            "DELAUNAY")


        print ("TIN created!")

    except Exception as ex:
        print ("Exception occurred!" + str(ex))
        print (arcpy.GetMessages())

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.