2 Replies Latest reply on May 18, 2012 12:15 PM by matt.walker@cartopac.com

    Creating a feature class within a feature dataset crashes ArcCatalog

    matt.walker@cartopac.com
      I am trying to copy an existing feature class that is within a feature dataset and paste in a new feature class (this same schema, but a linear feature instead of a point feature-i.e. using the existing point feature class as a template for the new linear feature class) into that same feature dataset, using this code:

      import arcpy from arcpy import env env.workspace = r"database connections\connection to BASE.sde"  #Use existing Feature class (point) feature (<Featureclass_Name>) as template to create new linear Feature class arcpy.CreateFeatureclass_management("database connections/connection to KMC-BASE.sde", "BASE.BASE.KMC.Exposures_Platte_Line",  "POLYLINE", "BASE.BASE.Exposures_Platte", "ENABLED", "ENABLED")

      and ArcCatalog crashes after about a minute of thinking, no error thrown. Any ideas on this issue?
        • Re: Creating a feature class within a feature dataset crashes ArcCatalog
          matt.walker@cartopac.com
          I am trying to copy an existing feature class that is within a feature dataset and paste in a new feature class (this same schema, but a linear feature instead of a point feature-i.e. using the existing point feature class as a template for the new linear feature class) into that same feature dataset, using this code:

          import arcpy
          from arcpy import env
          env.workspace = r"database connections\connection to BASE.sde"
          
          #Use existing Feature class (point) feature (<Featureclass_Name>) as template to create new linear Feature class
          arcpy.CreateFeatureclass_management("database connections/connection to KMC-BASE.sde", "BASE.BASE.KMC.Exposures_Platte_Line", 
          "POLYLINE", "BASE.BASE.Exposures_Platte", "ENABLED", "ENABLED")
          

          and ArcCatalog crashes after about a minute of thinking, no error thrown. Any ideas on this issue?


          Just seeing if I can refresh this post, and see if anyone out there knows why ArcCatalog crashes with my code.  I'm basically trying to use Python script to create a linear feature within an existing feature dataset, and using an existing feature class as a template.
          • Re: Creating a feature class within a feature dataset crashes ArcCatalog
            matt.walker@cartopac.com
            Just seeing if I can refresh this post, and see if anyone out there knows why ArcCatalog crashes with my code.  I'm basically trying to use Python script to create a linear feature within an existing feature dataset, and using an existing feature class as a template.


            Solution!:
            I needed to resolve the spaces that were in the connection paths by placing an 'r' (MUST be lower case!) in front of each path.  This code worked (I made a variable, 'Path', for the above path name to make deployment of this code more efficient):

            arcpy.CreateFeatureclass_management(Path, r"Exposures_Platte_Line_Test2", "POLYLINE", Path +"\BASE.BASE.Exposures_Platte")