ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Geometry Namespace / MultipatchBuilderEx Class / From3DModelFile Method
The file system location of the 3D model.
The spatial reference of the output geometry.
Example

In This Topic
    From3DModelFile Method
    In This Topic
    Creates a new instance of a Multipatch class from a supported 3D model file.
    Syntax
    public static Multipatch From3DModelFile( 
       string filePath,
       SpatialReference spatialReference
    )
    Public Shared Function From3DModelFile( _
       ByVal filePath As String, _
       Optional ByVal spatialReference As SpatialReference _
    ) As Multipatch

    Parameters

    filePath
    The file system location of the 3D model.
    spatialReference
    The spatial reference of the output geometry.

    Return Value

    The model geometry. An empty multipatch will be returned if the model file cannot be read or if the model file contains no geometry.
    Exceptions
    ExceptionDescription
    FilePath is not specified.
    If the file does not exist.
    If the file exists but isn't a normal readable file or the file extension is not supported.
    Remarks

    The 3D model files that are supported are .3DS, .DAE, .FLT, .OBJ, .glTF, .GLB, .DWG, .FBX, .IFC, .USD, .USDA, .USDC, .USDZ).

    The default spatial reference of the created multipatch will be WGS84 if one is not provided.

    Example
    Construct Multipatch from a 3D model file
    try
    {
      var model = ArcGIS.Core.Geometry.MultipatchBuilderEx.From3DModelFile(@"c:\Temp\My3dModelFile.dae");
      bool modelIsEmpty = model.IsEmpty;
    }
    catch (FileNotFoundException)
    {
      // file not found
    }
    catch (ArgumentException)
    {
      // File extension is unsupported or cannot read the file
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also