+ Reply to Thread
Results 1 to 3 of 3

Thread: Creating a feature class within a feature dataset crashes ArcCatalog

  1. #1
    Matthew Walker
    Join Date
    May 2012
    Posts
    13
    Points
    0
    Answers Provided
    0


    0

    Default Creating a feature class within a feature dataset crashes ArcCatalog

    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:

    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?
    Last edited by matt.walker@cartopac.com; 05-04-2012 at 11:53 AM.

  2. #2
    Matthew Walker
    Join Date
    May 2012
    Posts
    13
    Points
    0
    Answers Provided
    0


    0

    Default Re: Creating a feature class within a feature dataset crashes ArcCatalog

    Quote Originally Posted by matt.walker@cartopac.com View Post
    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:

    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.

  3. #3
    Matthew Walker
    Join Date
    May 2012
    Posts
    13
    Points
    0
    Answers Provided
    0


    0

    Default Re: Creating a feature class within a feature dataset crashes ArcCatalog

    Quote Originally Posted by matt.walker@cartopac.com View Post
    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):

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

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts