public void ExportScene3DObjects( ExportSceneContentsFormat exportFormat )
Public Sub ExportScene3DObjects( _ ByVal exportFormat As ExportSceneContentsFormat _ )
Parameters
- exportFormat
- The options for the export.
public void ExportScene3DObjects( ExportSceneContentsFormat exportFormat )
Public Sub ExportScene3DObjects( _ ByVal exportFormat As ExportSceneContentsFormat _ )
Exception | Description |
---|---|
System.InvalidOperationException | Export 3D objects is only supported for Local scenes. |
System.ArgumentNullException | The export format can not be null. |
System.ArgumentNullException | The Extent to export can not be null. |
System.Exception | The folder path is not accessible. |
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); } }
Target Platforms: Windows 11, Windows 10