Select to view content in your preferred language

Input for Layer3DToFeatureClass in Python Script

661
1
Jump to solution
02-01-2012 06:13 AM
AhjungKim
Deactivated User
I am writing a python script that will batch process Layer3DToFeatureClass.  I want all feature classes in a geodatabase to be processed.

import arcpy from arcpy import env env.overwriteOutput = True  inputFC = "C:/Data/3DScript/pythonTest.gdb" # Set workspace env.workspace = inputFC fcList = arcpy.ListFeatureClasses () arcpy.CheckOutExtension("3D") for featureClass in fcList:     outFC = inputFC + "/" + featureClass + "_3D"     arcpy.Layer3DToFeatureClass_3d(featureClass, outFC)


The above script results in "The value cannot be a feature class." In ArcGlobe, however, I can convert the exactly the same feature classes (extruded polygons) using the geoprocessing tool.  I am aware that the Layer3DToFeatureClass method requires a Feature Layer as input (http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00q900000083000000).  What am I missing here?

- Azung Kim
Tags (1)
0 Kudos
1 Solution

Accepted Solutions
EricRice
Esri Regular Contributor
Greetings,

The input needs to be 1 or more layer files (.lyr), which store the 3D rendering properties.

Regards,
Eric

View solution in original post

0 Kudos
1 Reply
EricRice
Esri Regular Contributor
Greetings,

The input needs to be 1 or more layer files (.lyr), which store the 3D rendering properties.

Regards,
Eric
0 Kudos