Aspose.CAD
22.2.0
See the version list below for details.
dotnet add package Aspose.CAD --version 22.2.0
NuGet\Install-Package Aspose.CAD -Version 22.2.0
<PackageReference Include="Aspose.CAD" Version="22.2.0" />
paket add Aspose.CAD --version 22.2.0
#r "nuget: Aspose.CAD, 22.2.0"
// Install Aspose.CAD as a Cake Addin #addin nuget:?package=Aspose.CAD&version=22.2.0 // Install Aspose.CAD as a Cake Tool #tool nuget:?package=Aspose.CAD&version=22.2.0
Fetch DWF Page Size Dimension via CAD .NET API
Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License
Aspose.CAD for .NET is a standalone class library to enhance ASP.NET & Windows applications to process & render CAD drawings without requiring AutoCAD or any other rendering workflow. The CAD Class Library allows high-quality conversion of DWG, DWF, DWFX, DWT, DGN, STL, OBJ, STL, CF2, IGES, IFC, PLT, and DXF files, layouts, and layers to PDF & raster image formats.
What is Aspose.CAD for .NET?
Aspose.CAD for .NET is a cross-platform library that seamlessly integrates; rendering, editing, reporting, and conversion capabilities for AutoCAD, and other CAD & BIM drawings into your own .NET Apps, without the need to install any 3rd party software.
It enables your C#, VB.NET, ASP.NET applications to work with plain plots, 3D solids, wired models, basic cube positions, 3D faces, surfaces, and meshes within DWG, DXF, DWF, and DGN file formats. Other supported formats include IFC, IGES, STL, DWT, PLT, DWFx, CFF2, and OBJ which can be exported to a variety of vector formats, such as; SVG, WMF, PDF as well as raster image formats (BMP, JP2, GIF, PSD, JPEG, TIF, PNG, etc.). You can also convert AutoCAD files to high-quality PDF, other vector formats, or raster images while tracking the file conversion process. Aspose.CAD for .NET also allows developers to select and convert specific layouts and layers.
Aspose.CAD for .NET supports Windows, Linux, Android, and iOS operating systems (32-bit and 64-bit). It could be integrated into your .NET infrastructure with .NET Core, Xamarin, Mono, or via classic .NET Framework.
CAD File Processing Features
- Convert CAD to PDF.
- Convert CAD to images.
- Track file processing progress.
- Manipulate drawing entities and blocks.
- Select and convert specific layouts of CAD drawings.
- Select and convert specific layers of CAD drawings.
- Adjust CAD drawing size before rendering.
- Support for BigFont.
- Automatically detect optimal zoom for the CAD drawings.
What's new in v22.2.0
Fetch Page Size & Page Dimensions of DWF
Added the ability to get the page size & page dimensions of DWF
file.
// The path to the documents directory.
string MyDir = RunExamples.GetDataDir_DWFDrawings();
string sourceFilePath = MyDir + "blocks_and_tables.dwf";
string extension = Path.GetExtension(sourceFilePath);
using (DwfImage image = (DwfImage)Aspose.CAD.Image.Load(sourceFilePath))
{
foreach (var page in image.Pages)
{
var layout = page.Name;
System.Console.WriteLine("Layout= " + layout);
using (FileStream fs = new FileStream(MyDir + "layout_" + layout + ".jpg", FileMode.Create))
{
JpegOptions jpegOptions = new JpegOptions();
CadRasterizationOptions options = new CadRasterizationOptions();
options.Layouts = new string[] { layout };
double sizeExtX = page.MaxPoint.X - page.MinPoint.X;
double sizeExtY = page.MaxPoint.Y - page.MinPoint.Y;
if (page.UnitType == UnitType.Inch)
{
options.PageHeight = CommonHelper.INtoPixels(sizeExtY, CommonHelper.DPI);
options.PageWidth = CommonHelper.INtoPixels(sizeExtX, CommonHelper.DPI);
}
else if (page.UnitType == UnitType.Millimeter)
{
options.PageHeight = CommonHelper.MMtoPixels(sizeExtY, CommonHelper.DPI);
options.PageWidth = CommonHelper.MMtoPixels(sizeExtX, CommonHelper.DPI);
}
else
{
options.PageHeight = (float)sizeExtY;
options.PageWidth = (float)sizeExtX;
}
jpegOptions.VectorRasterizationOptions = options;
image.Save(fs, jpegOptions);
}
}
}
Default Fallback Font
Added the facility to set the default fallback font.
DXF to PDF Transparency Effect in MTEXT
It was observed that during DXF
to PDF
conversion the MTEXT
(Multiple Text) was losing transparency. This issue has now been resolved.
The following is a simple C# code snippet that converts a specific layer from DXF format into PDF format via API:
string MyDir = RunExamples.GetDataDir_DXFDrawings();
string sourceFilePath = MyDir + "conic_pyramid.dxf";
using (Aspose.CAD.Image image = Aspose.CAD.Image.Load(sourceFilePath))
{
// Create an instance of CadRasterizationOptions and set its various properties
Aspose.CAD.ImageOptions.CadRasterizationOptions rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions();
rasterizationOptions.PageWidth = 1600;
rasterizationOptions.PageHeight = 1600;
// Add desired layers
rasterizationOptions.Layers = new string[] { "LayerA" };
// Create an instance of PdfOptions
Aspose.CAD.ImageOptions.PdfOptions pdfOptions = new Aspose.CAD.ImageOptions.PdfOptions();
// Set the VectorRasterizationOptions property
pdfOptions.VectorRasterizationOptions = rasterizationOptions;
MyDir = MyDir + "conic_pyramid_layer_out.pdf";
//Export the DXF to PDF
image.Save(MyDir, pdfOptions);
}
For a complete list of features, enhancements, and bug fixes in this release please visit, Aspose.CAD for .NET 22.2 - Release Notes.
Supported Read CAD Formats
AutoCAD®: DWG, DGN, DWT, DWF, DWFx
Plotter Configuration: PC3
Data Model: IFC
CAD Data Exchange: IGES
3D Printing: STL
Vector Based Plotter: PLT
3D Package Design CFF2
3D Geometry: OBJ
Supported Read & Write CAD Formats
AutoCAD®: DXF (Write feature is partially supported)
Save CAD As
Fixed Layout: PDF
Raster Image: TIFF, JPEG, PNG, GIF, BMP
Platform Independence
Aspose.CAD for .NET supports .NET framework (ASP.NET applications & Windows applications) as well as .NET Core. It supports any 32-bit or 64-bit operating system where .NET or Mono framework is installed, this includes but is not limited to, Microsoft Windows desktop (XP, Vista, 7, 8, 10), Microsoft Windows Server (2003, 2008, 2012), Microsoft Azure, Linux (Ubuntu, OpenSUSE, CentOS, and others), and Mac OS X.
Get Started
Are you ready to give Aspose.CAD for .NET a try? Simply execute Install-Package Aspose.CAD
from Package Manager Console in Visual Studio to fetch the NuGet package. If you already have Aspose.CAD for .NET and want to upgrade the version, please execute Update-Package Aspose.CAD
to get the latest version.
Add Watermark to CAD using C# Code
You can execute the below code snippet to see how the API performs in your environment or check the GitHub Repository for other common usage scenarios.
CadText text = new CadText();
text.DefaultValue = "Watermark text";
text.TextHeight = 40;
text.FirstAlignment = new Cad3DPoint(300, 40);
Export DXF to PDF using C# Code
var rasterizationOptions = new CadRasterizationOptions();
rasterizationOptions.PageWidth = 500;
rasterizationOptions.PageHeight = 500;
rasterizationOptions.Layouts = new string[] {
"Model"
};
var pdfOptions = new PdfOptions();
pdfOptions.VectorRasterizationOptions = rasterizationOptions;
cadImage.Save(dir + "output.pdf", pdfOptions);
Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net20 is compatible. net35 is compatible. net35-client is compatible. net40 is compatible. net40-client is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. monoandroid10 is compatible. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. monotouch10 is compatible. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. xamarinios10 is compatible. |
Xamarin.Mac | xamarinmac was computed. xamarinmac20 is compatible. |
Xamarin.TVOS | xamarintvos was computed. xamarintvos10 is compatible. |
Xamarin.WatchOS | xamarinwatchos was computed. xamarinwatchos10 is compatible. |
-
.NETFramework 2.0
- No dependencies.
-
.NETFramework 3.5
- No dependencies.
-
.NETFramework 3.5 Client
- No dependencies.
-
.NETFramework 4.0
- No dependencies.
-
.NETFramework 4.0 Client
- No dependencies.
-
.NETStandard 2.0
- System.Drawing.Common (>= 4.5.0)
- System.Text.Encoding.CodePages (>= 4.5.0)
-
MonoAndroid 1.0
- System.Text.Encoding.CodePages (>= 4.5.0)
-
MonoTouch 1.0
- System.Text.Encoding.CodePages (>= 4.5.0)
-
Xamarin.iOS 1.0
- System.Text.Encoding.CodePages (>= 4.5.0)
-
Xamarin.Mac 2.0
- System.Text.Encoding.CodePages (>= 4.5.0)
-
Xamarin.TVOS 1.0
- System.Text.Encoding.CodePages (>= 4.5.0)
-
Xamarin.WatchOS 1.0
- System.Text.Encoding.CodePages (>= 4.5.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Aspose.CAD:
Package | Downloads |
---|---|
Aspose.Total
Aspose.Total for .NET is the most complete package of all .NET file format APIs offered by Aspose. It empowers developers to create, edit, render, print and convert between a wide range of popular document formats within any .NET, C#, ASP.NET and VB.NET applications. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
24.10.0 | 1,490 | 10/28/2024 |
24.9.0 | 6,947 | 9/27/2024 |
24.8.0 | 6,619 | 9/1/2024 |
24.7.0 | 10,948 | 8/2/2024 |
24.6.0 | 16,514 | 6/24/2024 |
24.5.0 | 2,868 | 5/31/2024 |
24.4.0 | 13,929 | 4/28/2024 |
24.3.0 | 13,180 | 3/26/2024 |
24.2.0 | 18,421 | 2/29/2024 |
24.1.0 | 28,608 | 2/12/2024 |
23.12.0 | 17,564 | 1/2/2024 |
23.11.0 | 12,408 | 12/17/2023 |
23.10.0 | 25,221 | 11/13/2023 |
23.9.0 | 45,358 | 10/2/2023 |
23.8.0 | 38,927 | 8/22/2023 |
23.7.0 | 50,040 | 7/20/2023 |
23.6.0 | 56,262 | 6/22/2023 |
23.5.0 | 52,562 | 5/24/2023 |
23.4.0 | 49,484 | 4/26/2023 |
23.3.0 | 71,524 | 3/26/2023 |
23.2.0 | 71,987 | 2/25/2023 |
23.1.0 | 39,288 | 1/26/2023 |
22.12.0 | 14,627 | 1/3/2023 |
22.11.0 | 45,499 | 11/27/2022 |
22.10.0 | 11,325 | 11/7/2022 |
22.9.0 | 46,830 | 10/4/2022 |
22.8.0 | 14,306 | 9/4/2022 |
22.7.0 | 85,901 | 7/17/2022 |
22.6.0 | 62,084 | 6/12/2022 |
22.5.0 | 39,214 | 5/19/2022 |
22.4.0 | 16,331 | 5/4/2022 |
22.3.0 | 11,172 | 4/23/2022 |
22.2.0 | 50,421 | 3/2/2022 |
22.1.0 | 11,672 | 2/5/2022 |
21.12.0 | 37,778 | 12/24/2021 |
21.11.0 | 18,975 | 11/22/2021 |
21.10.0 | 13,551 | 10/24/2021 |
21.9.0 | 25,394 | 9/9/2021 |
21.8.0 | 3,312 | 9/1/2021 |
21.7.0 | 59,458 | 8/4/2021 |
21.6.0 | 12,552 | 7/13/2021 |
21.5.0 | 24,782 | 5/31/2021 |
21.4.0 | 49,549 | 5/10/2021 |
21.3.0 | 25,403 | 4/11/2021 |
21.2.0 | 12,760 | 3/16/2021 |
21.1.0 | 17,909 | 2/9/2021 |
20.12.0 | 6,185 | 1/16/2021 |
20.11.0 | 13,708 | 12/10/2020 |
20.10.0 | 18,740 | 11/9/2020 |
20.9.1 | 15,536 | 10/5/2020 |
20.8.1 | 3,449 | 9/12/2020 |
20.7.0 | 7,931 | 8/6/2020 |
20.6.0 | 4,702 | 6/27/2020 |
20.4.0 | 19,105 | 5/8/2020 |
20.3.0 | 5,982 | 3/31/2020 |
20.1.0 | 14,062 | 1/25/2020 |
19.9.0 | 18,097 | 10/7/2019 |
19.7.0 | 36,438 | 8/10/2019 |
19.5.0 | 2,802 | 5/19/2019 |
19.2.0 | 2,192 | 3/14/2019 |
18.12.0 | 4,615 | 1/9/2019 |
18.8.1 | 2,241 | 11/28/2018 |
18.8.0 | 3,136 | 9/3/2018 |
18.3.0 | 6,186 | 3/9/2018 |
17.12.0 | 2,205 | 12/21/2017 |
17.9.0 | 4,487 | 9/23/2017 |
17.4.0 | 3,170 | 4/28/2017 |
17.2.0 | 3,149 | 2/20/2017 |
16.12.1 | 1,800 | 12/29/2016 |
16.12.0 | 1,593 | 12/16/2016 |
16.10.0 | 1,865 | 10/19/2016 |
1.1.0 | 2,104 | 8/3/2016 |
1.0.0 | 2,582 | 5/24/2016 |