RenderResult

CadRasterizationOptions.RenderResult field

渲染结果处理程序。

public CadRenderHandler RenderResult;

例子

设置错误处理程序以捕获所有导出错误并将它们打印到 STDOUT

using (var image = Aspose.CAD.Image.Load("fileName.dwg"))
{
    image.Save("targetFile.bmp", new BmpOptions()
    {
        VectorRasterizationOptions = new CadRasterizationOptions()
        {
            RenderResult = result =>
            {
                if (!result.IsRenderComplete)
                {
                    foreach (var resultFailure in result.Failures)
                    {
                        Console.WriteLine($"Error: {resultFailure.Message} (error code {resultFailure.RenderCode})");
                    }
                }
            }
        }
    });
}

也可以看看