Import 3D Files (3D Analyst)
Summary
Imports one or more 3D models into a multipatch feature class.
Usage
-
The 3D Studio Max (*.3ds), VRML and GeoVRML 2.0 (*.wrl), SketchUp 6.0 (*.skp), OpenFlight 15.8 (*.flt), and billboards (PNG, JPEG, BMP, TIFF, GIF, and so on) formats are supported.
-
GeoVRML is the only format that has a defined coordinate system. The other formats tend to use local coordinate systems (in other words, centered on 0,0,0). In the latter case, the output shapes will need to be georeferenced.
-
When multiple files are input, the coordinate system of the first file is used for all the files. For all formats other than GeoVRML, this will be Unknown.
-
Place the output feature class in a geodatabase to preserve textures (images mapped onto geometry faces).
-
If the output multipatches are oriented with their tops facing sideways, try using this tool again by setting the Y_Is_Up parameter to true (checked) to adjust the orientation.
-
Unsupported geometry types for VRML files include Box, Cone, Cylinder, Extrusion, PointSet, Sphere, and Text.
-
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.
Syntax
Parameter | Explanation | Data Type |
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 (Optional) |
Indicates whether to produce one feature per file or one feature for each root node in a file.
| Boolean |
spatial_reference (Optional) |
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 (Optional) |
The vertical orientation of the input coordinate system.
| Boolean |
file_suffix (Optional) |
The suffix of the files to import from an input folder. This parameter is required when a folder is specified as input. | String |
Code Sample
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)
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