<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Exporting ViewSheet element through ExportContext2D in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9941300#M30475</link>
    <description>&lt;P&gt;Sure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried using the custom exporter that I implemented above (attached) on your sample model and see that you are trying to export a sheet view.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can reproduce the behaviour you describe:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="custom_export_2d_view_not_exportable.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/856583i94E0DE49027C2B65/image-size/medium?v=v2&amp;amp;px=400" role="button" title="custom_export_2d_view_not_exportable.png" alt="custom_export_2d_view_not_exportable.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please read the documentation on the&amp;nbsp;IExportContext2D interface; it clearly states:&amp;nbsp;An interface that is used in custom export to export &lt;U&gt;2D views of a Revit model&lt;/U&gt;. I am sorry to have to point out that a sheet is not a 2D view of the model. That is presumably the reason why this exception is triggered:&amp;nbsp;the view is not exportable, indeed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Dec 2020 13:48:48 GMT</pubDate>
    <dc:creator>jeremytammik</dc:creator>
    <dc:date>2020-12-15T13:48:48Z</dc:date>
    <item>
      <title>Exporting ViewSheet element through ExportContext2D</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9865210#M30466</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying the use the ExportContext2D to export a ViewSheet type element.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am receiving the following error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pmeigneux_0-1605200654000.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/843604i2CCADB2E2C89D9C0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pmeigneux_0-1605200654000.png" alt="pmeigneux_0-1605200654000.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a sample of code that I use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FilteredElementCollector colS = new FilteredElementCollector(Doc).OfClass(typeof(ViewSheet));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (ViewSheet sheet in colS)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExporterAdnMeshDS_UPS.ExportContext2D context = new ExporterAdnMeshDS_UPS.ExportContext2D(Doc);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CustomExporter exporter = new CustomExporter(Doc, context);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exporter.Export(vs);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exporter.Dispose();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (ArgumentNullException e)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;catch (ArgumentException e)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (InvalidOperationException e)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know an alternate way to realize the export of a ViewSheet? I was maybe thinking to convert it into another view type. Any best recommendation on it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 17:07:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9865210#M30466</guid>
      <dc:creator>pmeigneux</dc:creator>
      <dc:date>2020-11-12T17:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting ViewSheet element through ExportContext2D</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9872296#M30467</link>
      <description>&lt;P&gt;You are looping over all the ViewSheet elements that you encounter, without checking anything further.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe you should always check for and eliminate template views, for instance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest that you export the view sheets one by one and determine exactly which one causes a problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe it is one that you should be skipping anyway.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 11:53:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9872296#M30467</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2020-11-16T11:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting ViewSheet element through ExportContext2D</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9872505#M30468</link>
      <description>&lt;P&gt;&lt;SPAN style="color: #252525; font-family: Roboto, arial, sans-serif; font-size: 18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;I don't see anything special on my views (see attachments).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 13:10:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9872505#M30468</guid>
      <dc:creator>pmeigneux</dc:creator>
      <dc:date>2020-11-16T13:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting ViewSheet element through ExportContext2D</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9872507#M30469</link>
      <description>&lt;P&gt;suite..&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 13:11:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9872507#M30469</guid>
      <dc:creator>pmeigneux</dc:creator>
      <dc:date>2020-11-16T13:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting ViewSheet element through ExportContext2D</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9872510#M30470</link>
      <description>&lt;P&gt;suite..&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 13:12:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9872510#M30470</guid>
      <dc:creator>pmeigneux</dc:creator>
      <dc:date>2020-11-16T13:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting ViewSheet element through ExportContext2D</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9877892#M30471</link>
      <description>&lt;P&gt;is it possible to export by CustomExporter2D viewsheets other than templates?&lt;/P&gt;&lt;P&gt;the viewsheets that I want to export, exort correctly with Doc.Export in dwg.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;philippe&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 11:56:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9877892#M30471</guid>
      <dc:creator>pmeigneux</dc:creator>
      <dc:date>2020-11-18T11:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting ViewSheet element through ExportContext2D</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9878526#M30472</link>
      <description>&lt;P&gt;I tried to implement a test and encountered no problem whatsoever.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the result of exporting the Level 1 view with a trivial 2D custom exporter implementation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample view:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2020-11-18 at 16.48.00.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/845870i903AE6B1C00D17FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2020-11-18 at 16.48.00.png" alt="Screenshot 2020-11-18 at 16.48.00.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Source code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;#region Namespaces
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.UI.Selection;
#endregion

namespace CustomExport2d
{
  [Transaction( TransactionMode.Manual )]
  public class Command : IExternalCommand
  {
    class CustomExport2dContext : IExportContext2D
    {
      public void Finish()
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
      }

      public bool IsCanceled()
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
        return false;
      }

      public RenderNodeAction OnCurve( CurveNode node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
        return RenderNodeAction.Proceed;
      }

      public RenderNodeAction OnElementBegin( ElementId elementId )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
        return RenderNodeAction.Proceed;
      }

      public RenderNodeAction OnElementBegin2D( ElementNode node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
        return RenderNodeAction.Proceed;
      }

      public void OnElementEnd( ElementId elementId )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
      }

      public void OnElementEnd2D( ElementNode node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
      }

      public RenderNodeAction OnFaceBegin( FaceNode node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
        return RenderNodeAction.Proceed;
      }

      public RenderNodeAction OnFaceEdge2D( FaceEdgeNode node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
        return RenderNodeAction.Proceed;
      }

      public void OnFaceEnd( FaceNode node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
      }

      public RenderNodeAction OnFaceSilhouette2D( FaceSilhouetteNode node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
        return RenderNodeAction.Proceed;
      }

      public RenderNodeAction OnInstanceBegin( InstanceNode node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
        return RenderNodeAction.Proceed;
      }

      public void OnInstanceEnd( InstanceNode node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
      }

      public void OnLight( LightNode node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
      }

      public void OnLineSegment( LineSegment segment )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
      }

      public RenderNodeAction OnLinkBegin( LinkNode node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
        return RenderNodeAction.Proceed;
      }

      public void OnLinkEnd( LinkNode node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
      }

      public void OnMaterial( MaterialNode node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
      }

      public RenderNodeAction OnPolyline( PolylineNode node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
        return RenderNodeAction.Proceed;
      }

      public void OnPolylineSegments( PolylineSegments segments )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
      }

      public void OnPolymesh( PolymeshTopology node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
      }

      public void OnRPC( RPCNode node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
      }

      public void OnText( TextNode node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
      }

      public RenderNodeAction OnViewBegin( ViewNode node )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
        return RenderNodeAction.Proceed;
      }

      public void OnViewEnd( ElementId elementId )
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
      }

      public bool Start()
      {
        Debug.Print( System.Reflection.MethodBase.GetCurrentMethod().Name );
        return true;
      }
    }

    public Result Execute(
      ExternalCommandData commandData,
      ref string message,
      ElementSet elements )
    {
      UIApplication uiapp = commandData.Application;
      UIDocument uidoc = uiapp.ActiveUIDocument;
      Application app = uiapp.Application;
      Document doc = uidoc.Document;
      View view = doc.ActiveView;

      CustomExport2dContext c = new CustomExport2dContext();

      CustomExporter ce = new CustomExporter( doc, c );

      ce.Export( view );

      return Result.Succeeded;
    }
  }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output result:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Start
IsCanceled
OnViewBegin
IsCanceled
OnElementBegin2D
IsCanceled
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
OnElementEnd2D
IsCanceled
OnElementBegin2D
IsCanceled
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
OnElementEnd2D
IsCanceled
OnElementBegin2D
IsCanceled
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
OnElementEnd2D
IsCanceled
OnElementBegin2D
IsCanceled
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
OnElementEnd2D
IsCanceled
OnElementBegin2D
IsCanceled
OnInstanceBegin
IsCanceled
OnInstanceEnd
OnElementEnd2D
IsCanceled
OnElementBegin2D
IsCanceled
OnInstanceBegin
OnInstanceEnd
OnElementEnd2D
IsCanceled
OnElementBegin2D
IsCanceled
OnInstanceBegin
OnInstanceEnd
OnElementEnd2D
IsCanceled
OnElementBegin2D
IsCanceled
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
OnElementEnd2D
OnViewEnd
IsCanceled
OnViewBegin
OnViewEnd
IsCanceled
OnViewBegin
IsCanceled
OnElementBegin2D
IsCanceled
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnElementEnd2D
IsCanceled
OnElementBegin2D
IsCanceled
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnElementEnd2D
IsCanceled
OnElementBegin2D
IsCanceled
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnElementEnd2D
IsCanceled
OnElementBegin2D
IsCanceled
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnElementEnd2D
IsCanceled
OnElementBegin2D
IsCanceled
OnInstanceBegin
OnCurve
OnCurve
OnCurve
OnCurve
OnCurve
IsCanceled
OnInstanceEnd
OnElementEnd2D
IsCanceled
OnElementBegin2D
IsCanceled
OnInstanceBegin
OnInstanceEnd
OnElementEnd2D
IsCanceled
OnElementBegin2D
IsCanceled
OnInstanceBegin
OnInstanceEnd
OnElementEnd2D
IsCanceled
OnElementBegin2D
IsCanceled
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
IsCanceled
OnFaceBegin
OnFaceEnd
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnFaceEdge2D
OnElementEnd2D
IsCanceled
OnElementBegin2D
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnElementEnd2D
IsCanceled
OnElementBegin2D
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnElementEnd2D
IsCanceled
OnElementBegin2D
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnElementEnd2D
IsCanceled
OnElementBegin2D
OnPolylineSegments
OnPolylineSegments
OnElementEnd2D
IsCanceled
OnElementBegin2D
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnElementEnd2D
IsCanceled
OnElementBegin2D
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnPolylineSegments
OnElementEnd2D
OnViewEnd
IsCanceled
OnViewBegin
OnViewEnd
Finish&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample code attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 15:51:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9878526#M30472</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2020-11-18T15:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting ViewSheet element through ExportContext2D</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9912154#M30473</link>
      <description>&lt;P&gt;don't work with my document (in attachment).&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 11:05:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9912154#M30473</guid>
      <dc:creator>pmeigneux</dc:creator>
      <dc:date>2020-12-03T11:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting ViewSheet element through ExportContext2D</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9941174#M30474</link>
      <description>&lt;P&gt;&lt;SPAN style="color: #252525; font-family: Roboto, arial, sans-serif; font-size: 18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;can no one help?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 13:01:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9941174#M30474</guid>
      <dc:creator>pmeigneux</dc:creator>
      <dc:date>2020-12-15T13:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting ViewSheet element through ExportContext2D</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9941300#M30475</link>
      <description>&lt;P&gt;Sure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried using the custom exporter that I implemented above (attached) on your sample model and see that you are trying to export a sheet view.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can reproduce the behaviour you describe:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="custom_export_2d_view_not_exportable.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/856583i94E0DE49027C2B65/image-size/medium?v=v2&amp;amp;px=400" role="button" title="custom_export_2d_view_not_exportable.png" alt="custom_export_2d_view_not_exportable.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please read the documentation on the&amp;nbsp;IExportContext2D interface; it clearly states:&amp;nbsp;An interface that is used in custom export to export &lt;U&gt;2D views of a Revit model&lt;/U&gt;. I am sorry to have to point out that a sheet is not a 2D view of the model. That is presumably the reason why this exception is triggered:&amp;nbsp;the view is not exportable, indeed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 13:48:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/exporting-viewsheet-element-through-exportcontext2d/m-p/9941300#M30475</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2020-12-15T13:48:48Z</dc:date>
    </item>
  </channel>
</rss>

