Select to view content in your preferred language

How to create a custom ExportFormat

238
1
a month ago
BerendVeldkamp
Frequent Contributor

I was looking at creating a custom ExportFormat, but was wondering where to implement the actual export method. I was expecting an overridable Execute() method or something like that, but can't find it. The documentation doesn't really go into details.

 

I guess the basics should be something like this:

internal class MyExporter : ExportFormat
{
    public MyExporter(): base()
    {
        _extensions.Add("my");            
    }

    public override bool ValidateOutputFilePath()
    {
        return true;
    }       
}

///

internal class Button1 : Button
{
    protected override void OnClick()
    {
        QueuedTask.Run(() =>
        {
            var e = new MyExporter();
            e.OutputFileName = @"d:\temp\test.my";
            MapView.Active.Export(e);
        });
    }
}

 

0 Kudos
1 Reply
CharlesMacleod
Esri Regular Contributor

The api is not extensible in that regard. You would basically have to write something like:

MyModule.Current.MyCustomExportMethod(MapView.Active, ....) assuming that u cld actually access, via the available public api, the relevant properties, etc. u wld need for implementation of your custom export

0 Kudos