Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. arcpy.MakeFeatureLayer_management(pipes,"pipeslyr")
  2. arcpy.SetParameter(0,"pipeslyr")
  3. pipesnew = os.path.join(ws,"pipesnew")
  4.  
  5. arcpy.CopyFeatures_management("pipeslyr", pipesnew)
  6.  
  7. import arcpy
  8. from arcpy import env
  9.  
  10. arcpy.env.workspace = "in_memory"
  11.  
  12. selected_features = "The Feature Class with the selection.shp"
  13. pipes = "the new feature class to convert to a layer"
  14.  
  15. #this will create a new feature class from the selected features but will do it In Memory
  16. arcpy.CopyFeatures_management (selected_features, pipes)
  17.  
  18. #Now do all the other stuff you want like convert it to a layer and work with it
  19.  
  20. arcpy.MakeFeatureLayer_management(pipes,"pipeslyr")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement