Import 3D Files (3D Analyst)

Summary

Imports one or more 3D models into a multipatch feature class.

Usage

  • Preserve the texture of 3D models by storing the output multipatch in a geodatabase. Shapefiles do not support the retention of textures.

  • If the top side of the resulting multipatch features are oriented sideways, try adjusting the orientation by using this tool again with the Y Is Up parameter enabled.

  • GeoVRML is the only format that has a defined coordinate system. Many 3D models are generated using local coordinate systems that center the XYZ axis on 0, 0, 0. Such features can be georeferenced to real-world coordinates using one of the following methods:

    • If the 3D models need to be rotated and shifted, consider performing spatial adjustment techniques to position the features properly.
    • If the 3D models are oriented properly for a given coordinate system and only need to be shifted to the correct position, consider customizing the Coordinate System properties to produce the necessary shift. If point features that define the position of each model's centroid in real-world coordinates are available, consider using the points as inputs for the tool to georeference the models.
  • Point and line geometries that may exist in a 3D file are not maintained in the output multipatch feature class, as multipatches do not support them.

    Note:

    Unsupported geometry types for VRML files include Box, Cone, Cylinder, Extrusion, PointSet, Sphere, and Text.

Syntax

Import3DFiles(in_files, out_featureClass, {root_per_feature}, {spatial_reference}, {y_is_up}, file_suffix, {in_featureClass}, {symbol_field})
ParameterExplanationData Type
in_files
[in_files,...]

One or more 3D models or folders containing such files in the supported formats, which are 3D Studio Max (*.3ds), VRML and GeoVRML (*.wrl), OpenFlight (*.flt), COLLADA (*.dae), and Wavefront OBJ models (*.obj).

File; Folder
out_featureClass

The multipatch that will be created from the input files.

Feature Class
root_per_feature
(Optional)

Indicates whether to produce one feature per file or one feature for every root node in the file. This option only applies to VRML models.

  • ONE_ROOT_ONE_FEATUREThe generated output will contain one feature for each root node in the file.
  • ONE_FILE_ONE_FEATUREThe generated output will contain one file for each feature. This is the default.
Boolean
spatial_reference
(Optional)

The coordinate system of the input data. For the majority of formats, this is unknown. Only the GeoVRML format stores its coordinate system, and its default will be obtained from the first file in the list unless a spatial reference is specified here.

Spatial Reference
y_is_up
(Optional)

Identifies the axis that defines the vertical orientation of the input files.

  • Z_IS_UPIndicates that z is up. This is the default.
  • Y_IS_UPIndicated that y is up.
Boolean
file_suffix

The file extension of the files to import from an input folder. This parameter is required when at least one folder is specified as an input.

  • *All supported files. This is the default.
  • 3DS3D Studio Max
  • WRLVRML or GeoVRML
  • FLTOpenFlight
  • DAECollada
  • OBJWavefront OBJ model
String
in_featureClass
(Optional)

The point features whose coordinates define the real-world position of the input files. Each input file will be matched to its corresponding point based on the file names stored in the Symbol Field. The Coordinate System parameter should be defined to match the spatial reference of the points.

Feature Layer
symbol_field
(Optional)

The field in the point features containing the name of the 3D file associated with each point.

Field

Code sample

Import3DFiles example 1 (Python window)

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

arcpy.env.workspace = "C:/data"
arcpy.Import3DFiles_3d("AddisSheraton.skp", "Test.gdb/AddisSheraton", False, "", False)
Import3DFiles example 2 (stand-alone script)

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

'''****************************************************************************
Name: Import3DFiles Example
Description: This script demonstrates how to use the
             ListFiles method to collect all OpenFlight (*.flt) models in a
             workspace as input for the Import3DFiles tool.
****************************************************************************'''

# Import system modules
import arcpy

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

# Set Local Variables
OpenFlightList = arcpy.ListFiles("*.flt")
CS = "Coordinate Systems/Geographic Coordinate Systems/World/WGS 1984.prj"
outputFC = "Test.gdb/OpenFlight_Models"
if len(OpenFlightList) > 0:
    # Execute Import3DFiles
    arcpy.Import3DFiles_3d(OpenFlightList, outputFC, False, CS, False)
else:
    # Returned if there are no flt files in the target workspace
    print("There are no OpenFlight files in the " + env.workspace + " directory.")

Licensing information

  • Basic: Requires 3D Analyst
  • Standard: Requires 3D Analyst
  • Advanced: Requires 3D Analyst

Related topics