SaveOptions/IOConfig FileFormat accessibility

Could FileFormat can be exposed as public instead of internal on IOConfig/SaveOptions?

FileFormat is necessary in order to get the file extension type. If your class was given a SaveOptions instance instead, you have no way of determining the file extension without manually checking all the derived types yourself, and even then you dont know if an FBXSaveOptions instance is ascii or binary.

I am currently using both FileFormat and SaveOptions as part of my configuration, but that seems redundant.


Thanks for contacting support.

Could you kindly share a sample code snippet from your environment where you can demonstrate an example of redundant usage of instances. We will log a ticket accordingly and share the ID with you.

Hi Asad

This isn’t an issue or anything, its just a minor request as you currently cannot get file extension from a SaveOptions instance.

public class SceneWriter : ISceneWriter
    private readonly SaveOptions options;
    private readonly string directory;

    public SceneWriter( SaveOptions options, string directory )
        this.options = options; = directory;

    public void StoreScene( Scene scene )
        string extension = "?"; // Can't get file extension from SaveOptions
        // Workaround is either inject FileFormat in addition to SaveOptions
        // or alternatively get the extension after checking whether your SaveOptions is
        // FBXSaveOptions, ObjSaveOptions, ect
        string scenePath = Path.Combine( directory, scene.Name + extension );

        scene.Save( scenePath, options );


Thank you for elaborating further.

We will be exposing the FileFormat property in SaveOptions/LoadOptions class in upcoming version of the API, Aspose.3D for .NET 19.9, which will be released in few days.