Load CAD document with options

GroupDocs.Conversion provides CadLoadOptions to give you control over how source CAD document will be processed. The following options could be set:

  • Format - the source document type is auto detected, but you could set the source document format explicitly with this property. Available options are: Dxf, Dwg, Dgn, Dwf, Stl, Ifc, Plt, Igs, Dwt
  • Width - sets desired page width
  • Height - sets desired page height
  • LayoutNames - specifies which CAD layout to be converted

Specify layouts to be converted

The following code sample shows how to convert cad document and convert only certain layouts:

Contracts.Func<LoadOptions> getLoadOptions = () => new CadLoadOptions
{
    LayoutNames = new []{ "Layout1", "Layout3" }
};
using (Converter converter = new Converter("with_layers_and_layouts.dwg", getLoadOptions))
{
    PdfConvertOptions options = new PdfConvertOptions();
    converter.Convert("converted.pdf", options);
}

Specify width and height

The following code sample shows how to convert cad document and specify width and height

Contracts.Func<LoadOptions> getLoadOptions = () => new CadLoadOptions
{
    Width = 1920,
    Height = 1080
};
using (Converter converter = new Converter("with_layers_and_layouts.dwg", getLoadOptions))
{
    PdfConvertOptions options = new PdfConvertOptions();
    converter.Convert("converted.pdf", options);
}

More resources

GitHub Examples

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

Free Online Document Converter Apps

Along with full-featured .NET library we provide free Apps and free services for document conversion. In order to see a full potential of GroupDocs.Conversion, you are welcome to convert DOC to PDF, DOC to XLSX, PDF to DOC, PDF to XLSX, PPT to DOC and more with Free Online Document Converter App or get a full advantage of Free Online Document Converter Suite with advanced conversion settings and many more enterprise built-in features.

Please note that more premium features, advanced options and enhanced document management experience is available for signed-in users at conholdate.app for FREE.
If you don’t own an account yet, register it now for free! No credit card is required!