import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "*")[0]
addLayer = arcpy.mapping.Layer(r"F:\project\Final\Ground floor\steps.lyr")
arcpy.mapping.AddLayer(df, addLayer, "BOTTOM")

this code is for adding a layer in arcmap. when i use the same code to add a 3D layer in arcscene i get the following error

cannot open map document

Failed to execute (addlayer).

1 Answer 1


Unfortunately, ArcScene has not been opened up to ArcPy like ArcMap has.

There is an ArcGIS Idea to have this functionality added to which you might like to add your name.

Alternatively, keep an eye on ArcGIS Pro because its ArcPy has a Camera class designed for 3D:

The Camera object provides access to 2D and 3D viewer properties that control the display in a MapFrame.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.