I'm trying to apply a Base Height extrusion that's 10 feet in height to all layers in my ArcGIS Pro map document using a python script. Per ESRI's documentation on extrusion, the syntax should be
extrusion ({extrusion_type}, {expression}) .
Below is a sample of code I'm trying to use. It's certainly not graceful as I'm still trying to learn python.
# Apply extrusion
for lyr in m.listLayers("CONDO*"):
if lyr.supports("EXTRUSION"):
lyr.extrusion('BASE_HEIGHT',10)
I'm not receiving any error when I run the script nor is it making updates to the layers. Any suggestions would be greatly appreciated!
question.... is it in the dataframe as you run the script (see RefreshActiveView) or after the project is saved and reopened? or it just doesn't plain work?
Yes, the layer is in the dataframe as I run the script. I was seeing where you were going with this and added the RefreshActiveView and still nothing.
for lyr in m.listLayers("CONDO*"):
if lyr.supports("EXTRUSION"):
lyr.extrusion('BASE_HEIGHT',10)
arcpy.RefreshActiveView()
arcmap? or Pro? are you in a dataframe (2D) or a scene (3D) http://desktop.arcgis.com/en/arcmap/10.3/guide-books/extensions/3d-analyst/extruding-features-by-a-c...
Turns out I forgot the geoprocess - Layer 3D To Feature Class. That's why my extrusion wasn't working. Thanks for your help though!