Layer 3D To Feature Class (3D Analyst)

Summary

Exports feature layers with 3D display properties to 3D lines or multipatch features.

Usage

  • Procedural rules and attribute-driven symbols are supported by this tool and will be preserved in the resulting multipatch.

  • Feature layers with symbology that has the following properties will be exported to a multipatch:

    • Extrusion or base height settings.
    • Character marker symbols with depth.
    • 3D model marker symbols whose size is denoted in real-world linear units such as feet, inches, meters, or centimeters. Color (including texture color) is the only material property from 3D model marker symbology that is honored.
    • Picture marker symbols can only be converted to multipatches if they display in a fixed spatial extent. That is, they must be in real-world size units, and they cannot be billboarded.
    • All line symbology.
    • All polygon symbology. If a polygon layer is provided without any 3D display properties, it will be exported as a multipatch that resembles the polygon.
  • This tool does not support features symbolized with any of the following properties:

    • Shape marker symbols that come from a file on disk.
    • Rasterized layers that are draped on the scene's surface.
    • Shape marker symbols that are sourced from a font but do not have a depth property.
    • 3D marker symbols whose size is not specified in real-world linear units such as feet, inches, meters or centimeters.
    • Any marker symbols that are billboarded. The position of these 2D symbols are dynamically oriented to face the camera position in a 3D scene, so they have no fixed orientation that can be used for exporting.
  • Environment settings for XYZ tolerance and resolution are only supported when the output is a line feature.

Parameters

LabelExplanationData Type
Input Feature Layer

The input feature layer with 3D display properties defined.

Feature Layer
Output Feature Class

The output feature class with 3D features. Extruded points will be exported as 3D lines. Points with 3D symbols, extruded lines, and polygons will be exported as multipatch features.

Feature Class
Grouping Field
(Optional)

The input feature's text field that will be used to merge multiple input features into the same output feature. The resulting output's remaining attributes will be inherited from one of the input records.

Field
Disable Color and Texture
(Optional)

Specifies whether color and texture properties will be maintained when exporting a 3D layer to a multipatch feature class.

  • Checked—Colors and textures will not be stored as part of the multipatch definition. This is the default.
  • Unchecked—Colors and textures will be preserved with the multipatch.
Boolean

arcpy.ddd.Layer3DToFeatureClass(in_feature_layer, out_feature_class, {group_field}, {disable_materials})
NameExplanationData Type
in_feature_layer

The input feature layer with 3D display properties defined.

Feature Layer
out_feature_class

The output feature class with 3D features. Extruded points will be exported as 3D lines. Points with 3D symbols, extruded lines, and polygons will be exported as multipatch features.

Feature Class
group_field
(Optional)

The input feature's text field that will be used to merge multiple input features into the same output feature. The resulting output's remaining attributes will be inherited from one of the input records.

Field
disable_materials
(Optional)

Specifies whether color and texture properties will be maintained when exporting a 3D layer to a multipatch feature class.

  • ENABLE_COLORS_AND_TEXTURESColors and textures will be preserved with the multipatch.
  • DISABLE_COLORS_AND_TEXTURESColors and textures will not be stored as part of the multipatch definition. This is the default.
Boolean

Code sample

Layer3DToFeatureClass example 1 (Python window)

The following sample demonstrates the use of this tool in the Python window.

arcpy.env.workspace = "C:/data"
arcpy.Layer3DToFeatureClass_3d("Points_3D.lyr", "Test.gdb/trees")
Layer3DToFeatureClass example 2 (stand-alone script)

The following sample demonstrates the use of this tool in a stand-alone Python script.

'''****************************************************************************
Name: Layer3DToFeatureClass Example
Description: This script demonstrates how to use the
             Layer3DToFeatureClass tool to create multipatches from all
             layers in a target workspace. The layer files are assumed to have
             been saved wtih 3D rendering from ArcScene.
****************************************************************************'''
# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = "C:/data"

# Use the ListFiles method to identify all layer files in workspace
if arcpy.ListFiles("*.lyr"):
    for lyrFile in arcpy.ListFiles("*.lyr"):
        # Set Local Variables
        outFC = "Test.gdb/{0}".format(lyrFile[:-4]) #Strips '.lyr' from name
        #Execute Layer3DToFeatureClass
        arcpy.Layer3DToFeatureClass_3d(file, outFC)
else:
    print("There are no layer files in {0}.".format(env.workspace))

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics