Request

Response

    ElementDataModel.CreateFileGeometry method (1 of 2)

    Creates an instance of FileGeometry using a memory stream. The stream data is written to a temporary file that will be automatically deleted when the FileGeometry is disposed. IMPORTANT: Caller must dispose the returned FileGeometry to avoid resource leaks.

    public static FileGeometry CreateFileGeometry(MemoryStream geometryStream, GeometryFormat format, 
        RenderStyle renderStyle = null, Units units = null)
    
    parameterdescription
    geometryStream The memory stream containing the geometry data.
    format The format of the geometry data.
    renderStyle An optional RenderStyle object to define the rendering style.
    units An optional Units object to specify the measurement units.

    Return Value

    Instance of FileGeometry with a temporary file. Caller must dispose to clean up.

    Exceptions

    exceptioncondition
    ArgumentNullException Thrown when geometryStream is null.
    ArgumentException Thrown when format is Unknown.

    See Also


    ElementDataModel.CreateFileGeometry method (2 of 2)

    It will create a instance of FileGeometry with the specified file path and format.

    public static FileGeometry CreateFileGeometry(string filePath, GeometryFormat format, 
        RenderStyle renderStyle = null, Units units = null)
    
    parameterdescription
    filePath Geometry file path.
    format Geometry file format. Example: .smb, .ttmesh.
    renderStyle Renderstyle object.
    units Units object.

    Return Value

    Instance of FileGeometry.

    See Also