Inside 3D (3D Analyst)


Tests each feature to determine if it falls inside a multipatch. If it falls inside a multipatch feature, it writes an entry to a new table indicating which feature it fell within.

Lean more about how Inside 3D works


Inside 3D tool graphic



Inside3D_3d (in_target_feature_class, in_container_feature_class, out_table, {complex_output})
ParameterExplanationData Type

The z-enabled point, line, polygon, or multipatch features.

Feature Layer

The multipatch features. The multipatches must be closed. Use the Is Closed 3D tool to determine if the multipatches are closed.

Feature Layer

The output table providing a list of 3D Input Features that are inside or partially inside the Input Multipatch Features which are closed. The output table contains an OBJECTID (object ID), Target_ID, and Status. The Status will state if the input feature (Target_ID) is inside or partially inside a multipatch.


The Complex Output Table option modifies the output table to include information about the relationship between the Input Features and the Input Multipatch Features. This allows you to identify which features fell inside or partially inside specific closed multipatches. When it's checked on, then the output table will have an extra Container_ID displayed, along with the Target_ID information. This Container_ID represents the exact multipatch which the input features (Target_ID) are inside or partially inside.


Code Sample

Inside 3D Example 1 (Python window)

The following Python Window script demonstrates how to use the Inside 3D function in immediate mode.

import arcpy
from arcpy import env

env.workspace = 'C:/data'
arcpy.Inside3D_3d('inFeature.shp', 'sample.gdb/multipatch', 'sample.gdb/output_table')
Inside 3D Example 2 (stand-alone script)

The following Python script demonstrates how to use the Inside 3D function in a stand-alone script.

Name: Inside3D Example
Description: This script demonstrates how to use the
             Inside3D tool.
# Import system modules
import arcpy
import exceptions, sys, traceback
from arcpy import env

    # Obtain a license for the ArcGIS 3D Analyst extension
    # Set environment settings
    env.workspace = 'C:/data'
    # Set Local Variables
    inFC = 'Points_3D.shp' # the input feature
    inMP = 'Buildings.shp' # the input multi-patch
    # Ensure output has a unique name
    outTbl = arcpy.CreateUniqueName('Output_Table.dbf')
    # Execute Inside 3D
    arcpy.Inside3D_3d(inFC, inMP, outTbl)

except arcpy.ExecuteError:
    print arcpy.GetMessages()
    # 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


Related Topics

Licensing Information

ArcView: Requires 3D Analyst
ArcEditor: Requires 3D Analyst
ArcInfo: Requires 3D Analyst