Hello,
I am trying the use the ExportContext2D to export a ViewSheet type element.
I am receiving the following error:
Here is a sample of code that I use:
FilteredElementCollector colS = new FilteredElementCollector(Doc).OfClass(typeof(ViewSheet));
foreach (ViewSheet sheet in colS)
{
try
{
ExporterAdnMeshDS_UPS.ExportContext2D context = new ExporterAdnMeshDS_UPS.ExportContext2D(Doc);
CustomExporter exporter = new CustomExporter(Doc, context);
exporter.Export(vs);
exporter.Dispose();
}
catch (ArgumentNullException e)
{
}
catch (ArgumentException e)
{
}
catch (InvalidOperationException e)
{
}
}
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?
Thanks
Solved! Go to Solution.