Adding a feature class to a 3D Layer in Map_3D

Discussion created by matthiasBuehler on Sep 23, 2016
Latest reply on Sep 23, 2016 by matthiasBuehler



[ ArcGIS PRO 1.3.1 ]


I'm a bit stuck with arcpy when adding a feature class in the Map_3D viewer as a layer. Basically I'm trying to emulate the same thing that happens when drag-n-dropping a FC into the Contents pane, resp. the Map_3D viewer.


Code so far ..

import arcpy
aprx = + pName)

fc = gdbPath + gdbName + '/myFeatureClass'
lyr = arcpy.MakeFeatureLayer_management(fc, 'myLayer')

for map in aprx.listMaps():
   if map.mapType == 'SCENE':
      map.addLayer(lyr, add_position = 'AUTO_ARRANGE')


But this produces an error .. What am I missing?


Thanks for any input!