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;

More resources

GitHub Examples

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

Free Online App

Along with full-featured .NET library we provide simple but powerful free Apps. You are welcome to view Word, PDF, Excel, PowerPoint documents with free to use online GroupDocs Viewer App.