Render all layouts

When GroupDocs.Viewer renders CAD drawings we get only Model representation. In order to render Model and all non-empty Layouts within CAD drawing, the property CadOptions.RenderLayouts of HtmlViewOptions class (or PngViewOptions, or JpgViewOptions, or PdfViewOptions) is used.

Following are the steps to render all the non-empty layouts along with the Model.

The following code sample shows how to render layouts along with the Model of a CAD drawing.

using (Viewer viewer = new Viewer("sample.dwg"))
{
   HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources();
   viewOptions.CadOptions.RenderLayouts = true;
   viewer.View(viewOptions);
}

More resources

View CAD Drawings Online

Along with full-featured .NET library we provide simple but powerful free online Apps. View DXF, DWG, and DWF files online with GroupDocs Viewer App.

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples: