Layer 3D to Feature Class missing colors

459
0
06-29-2017 06:59 AM
ChristophStöckerl2
New Contributor

Hi,

I am using the 'Layer 3D to Feature Class' tool with features with features that are relative to the ground in order to get these features at an absolute height (as described in this thread). When I use the tool from the toolbox in ArcGIS Pro, everything works fine. But as this tool only accepts one layer at a time as an input layer, I tried to write a script that uses all layers in the current project. My script currently looks like this:

arcpy.env.workspace = r"C:\MA\ArcGISProProjects\Elev"
aprx = arcpy.mp.ArcGISProject('CURRENT')
MapList = aprx.listMaps()
Map3D = MapList[0]
LayerList = Map3D.listLayers()

for i in range(len(LayerList)):
    print (str(LayerList.name) + ' is being processed.')
    if LayerList.isFeatureLayer == True:
        LayerFile = LayerList
        outFile = r'{0}3D'.format(LayerList.name)
        arcpy.Layer3DToFeatureClass_3d(LayerFile, outFile, '#', 'ENABLE_COLORS_AND_TEXTURES')
    else:
        pass

When I'm running this script, the resulting multipatch layers are created without colors, although I set 'disable materials' to ENABLE_COLORS_AND_TEXTURES. I already tried the script without the optional parameters, I tried to save the layers as external layer files with, but nothing helped. Am I doing something wrong or is this a known bug?

0 Kudos
0 Replies