ArcGIS Pro 3.5 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ExportSceneContentsFormat Class
Members Example

In This Topic
    ExportSceneContentsFormat Class
    In This Topic
    Provides a base set of properties that all scene content export formats inherit.
    Object Model
    ExportSceneContentsFormat ClassEnvelope Class
    Syntax
    public class ExportSceneContentsFormat 
    Public Class ExportSceneContentsFormat 
    Example
    Export the contents of a scene to an exchange format such as STL.
    public void ExportSceneContents()
    {
      // Validate the current active view. Only a local scene can be exported.
      bool CanExportScene3DObjects = MapView.Active?.ViewingMode == MapViewingMode.SceneLocal;
      if (CanExportScene3DObjects)
      {
        //Gets the active map view.
        MapView mapView = MapView.Active;
        // Create a scene content export format, export the scene context as a stereolithography format
        var exportFormat = new STLExportSceneContentsFormat()
        {
          Extent = mapView.Extent, // sets Extent property
          FolderPath = @"C:\Temp", // sets FolderPath property
          FileName = "my-3d-objects.stl", //sets FileName property
          IsSingleFileOutput = true // sets whether to export to one single file
        };
        // Export the scene content as 3D objects
        mapView.ExportScene3DObjects(exportFormat);
      }
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Mapping.ExportSceneContentsFormat
          ArcGIS.Desktop.Mapping.STLExportSceneContentsFormat

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.5 or higher.
    See Also