BuildingCoder.CmdExportImage.ExportToImage2 C# (CSharp) Method

ExportToImage2() static private method

Wrapper for old sample code.
static private ExportToImage2 ( Document doc ) : System.Result
doc Document
return System.Result
    static Result ExportToImage2( Document doc )
    {
      Result r = Result.Failed;

      using( Transaction tx = new Transaction( doc ) )
      {
        tx.Start( "Export Image" );
        string filepath = ExportToImage( doc );
        tx.RollBack();

        if( 0 < filepath.Length )
        {
          Process.Start( filepath );
          r = Result.Succeeded;
        }
      }
      return r;
    }