Import 3D Files (3D Analyst)

Resumen

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

Uso

Sintaxis

Import3DFiles_3d (in_files, out_feature_class, {root_per_feature}, {spatial_reference}, {y_is_up}, {file_suffix})
ParámetroExplicaciónTipo de datos
in_files

One or more input files or folders with data in the supported formats. Supported formats include 3D Studio Max (*.3ds), SketchUp (*.skp), VRML and GeoVRML (*.wrl), and OpenFlight (*.flt).

File; Folder
out_feature_class

The output multipatch feature class to be created.

Feature Class
root_per_feature
(Opcional)

Indicates whether to produce one feature per file or one feature for each root node in a file.

  • 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
(Opcional)

The coordinate system of the input data. The default is taken from the first file in the list. For the majority of formats, this is Unknown. Only the GeoVRML format knows the coordinate system.

Spatial Reference
y_is_up
(Opcional)

The vertical orientation of the input coordinate system.

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

The suffix of the files to import from an input folder. This parameter is required when a folder is specified as input.

String

Ejemplo de código

Import3DFiles 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.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
from arcpy import env

# Obtain a license for the ArcGIS 3D Analyst extension
arcpy.CheckOutExtension("3D")

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

try:
    # 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."
    
except:
    # Returns any other error messages
    print arcpy.GetMessages(2)

del arcpy, OpenFlightList, CS, outputFC

Entornos

Temas relacionados

Información de licencia

ArcView: Requiere 3D Analyst
ArcEditor: Requiere 3D Analyst
ArcInfo: Requiere 3D Analyst

7/10/2012