ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Layer 3D To Feature Class

Available with 3D Analyst license.

  • Summary
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

Summary

Exports feature layers that have 3D properties defined to a multipatch feature class.

Usage

  • Only features whose rendering can be persisted as a multipatch will be converted, such as points symbolized with 3D markers. Texture fill symbols are not supported, nor are ArcMap layers because they do not retain any 3D properties.

  • Only certain 3D properties are applied, for example:

    • 3D symbols assigned to points
    • 3D symbols assigned to lines
    • Extrusion applied to polygons
    • Nonextruded polygons with z-values
    • Texture downsampling assigned to multipatches
  • Draped layers in ArcGlobe are not supported. Due to the dynamic nature of draped surfaces, height values will not be maintained.

  • Textured fill symbols are not supported. If a feature in the layer uses 3D marker symbols with restricted properties, like textures, the feature will not be added to the output.

    Note:

    A feature layer with 3D properties handles well for most visualization applications and will not need to be converted to a multipatch. However, converting the layer to a multipatch would be particularly useful if the resulting multipatch will be used for additional editing in third-party modeling software or if the multipatch is large and would be consumed in ArcGlobe as a cached layer.

Syntax

Layer3DToFeatureClass_3d (in_feature_layer, out_feature_class, {group_field})
ParameterExplanationData Type
in_feature_layer

The input feature layer that has 3D properties defined.

Feature Layer
out_feature_class

The output multipatch feature class.

Feature Class
group_field
(Optional)

The field in the input feature class that identifies the features that will be combined into the same multipatch feature. The resulting attributes will be set to one of the input records.

Field

Code Sample

Layer3DToFeatureClass example 1 (Python window)

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

import arcpy
from arcpy import env

arcpy.CheckOutExtension("3D")
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
from arcpy import env
import exceptions, sys, traceback

try:
    # Obtain a license for the ArcGIS 3D Analyst extension
    arcpy.CheckOutExtension("3D")
    
    # Set environment settings
    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:
        "There are no layer files in {0}.".format(env.workspace)

except arcpy.ExecuteError:
    print arcpy.GetMessages()
except:
    # Get the traceback object
    tb = sys.exc_info()[2]
    tbinfo = traceback.format_tb(tb)[0]
    # Concatenate error information into message string
    pymsg = 'PYTHON ERRORS:\nTraceback info:\n{0}\nError Info:\n{1}'\
          .format(tbinfo, str(sys.exc_info()[1]))
    msgs = 'ArcPy ERRORS:\n {0}\n'.format(arcpy.GetMessages(2))
    # Return python error messages for script tool or Python Window
    arcpy.AddError(pymsg)
    arcpy.AddError(msgs)

Environments

  • Current Workspace
  • Output XY Domain
  • Output Z Domain
  • Output Coordinate System
  • Extent
  • Scratch Workspace
  • XY Resolution
  • XY Tolerance
  • Z Resolution
  • Z Tolerance
  • Qualified Field Names
  • Output CONFIG Keyword
  • Auto Commit
  • Output Spatial Grid 1
  • Output Spatial Grid 2
  • Output Spatial Grid 3

Licensing Information

  • ArcGIS for Desktop Basic: Requires 3D Analyst
  • ArcGIS for Desktop Standard: Requires 3D Analyst
  • ArcGIS for Desktop Advanced: Requires 3D Analyst

Related Topics

  • An overview of the Conversion toolset
  • Fundamentals of geoprocessing with the ArcGIS 3D Analyst extension
  • About using extrusion as 3D symbology
  • About defining the z-value for a layer
  • Multipatches
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal