Browse our Products

Aspose.CAD for .NET 17.4 - Release Notes

KeySummaryCategory
CADNET-240Support DWF FormatFeature
CADNET-68Support MLeader Entity for DWG formatFeature
CADNET-200Converting DWG to PDF format is producing errorEnhancement
CADNET-197Add support for DXF and DWG file formats in FileFormat enumerationEnhancement
CADNET-245Converting DWG layers to PDF is producing incomplete text in the resultant PDFEnhancement
CADNET-196Converting DWG to PNG is producing incomplete imageEnhancement

Added APIs:

Class Aspose.CAD.FileFormats.Dwf.DwfImage

Class Aspose.CAD.FileFormats.Dwf.DwfLoader

Class Aspose.CAD.FileFormats.Dwf.DwfZip

Class Aspose.CAD.FileFormats.Dwf.EPlotInterface.DwfEPlotPage

Class Aspose.CAD.FileFormats.Dwf.Whip.DwfResult

Class Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser

Class Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipPNGGroup4ImageFormat

Class Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser

Class Aspose.CAD.FileFormats.Dwf.Whip.MaterializeStage

Class Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfDrawingInfo

Class Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfFileHeuristics

Class Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfRendition

Class Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipColorMap

Class Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalBox

Class Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint

Class Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipTransform

Class Aspose.CAD.ImageOptions.DwfRasterizationOptions

Class Aspose.CAD.ImageOptions.DwfRasterizationOptions.CadRenderHandler

Field/Enum Aspose.CAD.FileFormat.DXFCadR010

Field/Enum Aspose.CAD.FileFormat.DXFCadR012

Field/Enum Aspose.CAD.FileFormat.DXFCadR014

Field/Enum Aspose.CAD.FileFormat.DXFCadR015

Field/Enum Aspose.CAD.FileFormat.DXFCadR021

Field/Enum Aspose.CAD.FileFormat.DXFCadR0221

Field/Enum Aspose.CAD.FileFormat.DXFCadR0222

Field/Enum Aspose.CAD.FileFormat.DXFCadR025

Field/Enum Aspose.CAD.FileFormat.DXFCadR026

Field/Enum Aspose.CAD.FileFormat.DXFCadR10

Field/Enum Aspose.CAD.FileFormat.DXFCadR11

Field/Enum Aspose.CAD.FileFormat.DXFCadR13

Field/Enum Aspose.CAD.FileFormat.DXFCadR14

Field/Enum Aspose.CAD.FileFormat.DXFCadR2000

Field/Enum Aspose.CAD.FileFormat.DXFCadR2004

Field/Enum Aspose.CAD.FileFormat.DXFCadR2007

Field/Enum Aspose.CAD.FileFormat.DXFCadR2010

Field/Enum Aspose.CAD.FileFormat.DXFCadR2013

Field/Enum Aspose.CAD.FileFormat.DXFCadR9

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.CorruptFileError

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.DecompressionTerminated

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.DWFPackageFormat

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.DWFVersionHigherThanToolkit

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.EndOfDWFOpcodeFound

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.EndOfFileError

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.FileAlreadyOpenError

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.FileCloseError

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.FileInconsistencyWarning

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.FileOpenError

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.FileWriteError

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.InternalError

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.MinorVersionWarning

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.NoFileOpenError

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.NotADWFFileError

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.OpcodeNotValidForThisObject

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.OutOfMemoryError

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.Success

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.ToolkitUsageError

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.Undefined

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.UnknownFileReadError

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.UnsupportedDWFExtensionError

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.UnsupportedDWFOpcode

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.UserRequestedAbort

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfResult.WaitingForData

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipPNGGroup4ImageFormat.Group4

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipPNGGroup4ImageFormat.Group4XMapped

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipPNGGroup4ImageFormat.PNG

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.MaterializeStage.EatingEndWhitespace

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.MaterializeStage.EatingInitialWhitespace

Field/Enum Aspose.CAD.FileFormats.Dwf.Whip.MaterializeStage.GatheringString

Field/Enum Aspose.CAD.ImageOptions.DwfRasterizationOptions.RenderResult

Method Aspose.CAD.FileFormats.Dwf.DwfImage.#ctor(Aspose.CAD.FileFormats.Dwf.EPlotInterface.DwfEPlotPage[])

Method Aspose.CAD.FileFormats.Dwf.DwfImage.CacheData

Method Aspose.CAD.FileFormats.Dwf.DwfImage.Resize(System.Int32,System.Int32,Aspose.CAD.ImageResizeSettings)

Method Aspose.CAD.FileFormats.Dwf.DwfImage.Resize(System.Int32,System.Int32,Aspose.CAD.ResizeType)

Method Aspose.CAD.FileFormats.Dwf.DwfImage.RotateFlip(Aspose.CAD.RotateFlipType)

Method Aspose.CAD.FileFormats.Dwf.DwfImage.SaveData(System.IO.Stream)

Method Aspose.CAD.FileFormats.Dwf.DwfImage.SetPalette(Aspose.CAD.IColorPalette,System.Boolean)

Method Aspose.CAD.FileFormats.Dwf.DwfLoader.#ctor

Method Aspose.CAD.FileFormats.Dwf.DwfLoader.CanLoad(Aspose.CAD.StreamContainer,Aspose.CAD.LoadOptions)

Method Aspose.CAD.FileFormats.Dwf.DwfLoader.Load(Aspose.CAD.StreamContainer,Aspose.CAD.LoadOptions)

Method Aspose.CAD.FileFormats.Dwf.DwfZip.#ctor(System.IO.Stream,System.String)

Method Aspose.CAD.FileFormats.Dwf.DwfZip.#ctor(System.String,System.String)

Method Aspose.CAD.FileFormats.Dwf.DwfZip.Extract

Method Aspose.CAD.FileFormats.Dwf.EPlotInterface.DwfEPlotPage.#ctor(System.String)

Method Aspose.CAD.FileFormats.Dwf.EPlotInterface.DwfEPlotPage.LoadDrawableResources(System.String)

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.#ctor(System.IO.Stream)

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.#ctor(System.String)

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.DecrementParenCount

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.DeUpdateCurrentPoint(Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint)

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.EatWhiteSpace

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.IncrementParenCount

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.NextIncarnation

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.Read(System.Int32)

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.ReadAsciiInt32

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.ReadColor

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.ReadCount

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.ReadDouble

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.ReadLogicalBox

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.ReadLogicalPoint

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.ReadLogicalPoints(System.Int32,System.Int32)

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.ReadString(System.Int32,System.Boolean)

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.Seek(System.Int64)

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.SkipPastMatchingParen(System.Int32)

Method Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.UpdateCurrentPoint(Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint)

Method Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.DecrementParenCount

Method Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.DeUpdateCurrentPoint(Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint)

Method Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.EatWhiteSpace

Method Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.IncrementParenCount

Method Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.NextIncarnation

Method Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.Read(System.Int32)

Method Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.ReadAsciiInt32

Method Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.ReadColor

Method Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.ReadCount

Method Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.ReadDouble

Method Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.ReadLogicalBox

Method Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.ReadLogicalPoint

Method Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.ReadLogicalPoints(System.Int32,System.Int32)

Method Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.ReadString(System.Int32,System.Boolean)

Method Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.Seek(System.Int64)

Method Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.SkipPastMatchingParen(System.Int32)

Method Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.UpdateCurrentPoint(Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint)

Method Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfDrawingInfo.#ctor

Method Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfFileHeuristics.#ctor

Method Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfRendition.#ctor(System.Int32)

Method Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipColorMap.#ctor(System.Int32)

Method Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipColorMap.GetDefaultPallete

Method Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalBox.#ctor

Method Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalBox.#ctor(Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint,Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint)

Method Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint.#ctor

Method Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint.#ctor(System.Int32,System.Int32)

Method Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipTransform.#ctor

Method Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipTransform.#ctor(Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint,System.Double,System.Double,System.Int64)

Method Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipTransform.setRotation(System.Int64)

Method Aspose.CAD.ImageOptions.DwfRasterizationOptions.#ctor

Property Aspose.CAD.FileFormats.Dwf.DwfImage.BitsPerPixel

Property Aspose.CAD.FileFormats.Dwf.DwfImage.Height

Property Aspose.CAD.FileFormats.Dwf.DwfImage.IsCached

Property Aspose.CAD.FileFormats.Dwf.DwfImage.Pages

Property Aspose.CAD.FileFormats.Dwf.DwfImage.Width

Property Aspose.CAD.FileFormats.Dwf.EPlotInterface.DwfEPlotPage.MaxPoint

Property Aspose.CAD.FileFormats.Dwf.EPlotInterface.DwfEPlotPage.MinPoint

Property Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.HaveReadFirstOpcode

Property Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.Heuristics

Property Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.ParenCount

Property Aspose.CAD.FileFormats.Dwf.Whip.DwfWhipParser.Rendition

Property Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.HaveReadFirstOpcode

Property Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.Heuristics

Property Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.ParenCount

Property Aspose.CAD.FileFormats.Dwf.Whip.IDwfWhipParser.Rendition

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfDrawingInfo.ColorMap

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfDrawingInfo.DecimalRevision

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfDrawingInfo.MajorRevision

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfDrawingInfo.MinorRevision

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfFileHeuristics.ShouldApplyTransform

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfFileHeuristics.Transform

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfFileHeuristics.W2dChannel

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfRendition.ColorMap

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfRendition.DrawingInfo

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipColorMap.Colors

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalBox.Max

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalBox.Min

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint.X

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint.Y

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipTransform.Rotation

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipTransform.Translate

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipTransform.XScale

Property Aspose.CAD.FileFormats.Dwf.Whip.Objects.DwfWhipTransform.YScale

Property Aspose.CAD.ImageOptions.DwfRasterizationOptions.AutomaticLayoutsScaling

Property Aspose.CAD.ImageOptions.DwfRasterizationOptions.ContentAsBitmap

Property Aspose.CAD.ImageOptions.DwfRasterizationOptions.DrawType

Property Aspose.CAD.ImageOptions.DwfRasterizationOptions.GraphicsOptions

Property Aspose.CAD.ImageOptions.DwfRasterizationOptions.Layouts

Property Aspose.CAD.ImageOptions.DwfRasterizationOptions.NoScaling

Property Aspose.CAD.ImageOptions.DwfRasterizationOptions.TypeOfEntities

Usage examples

CADNET-240 Support DWF format Export to BMP

 string fileName = GetFileFromDesktop("APFH Floor Plan.dwf");

using (Aspose.CAD.Image image = Aspose.CAD.Image.Load(fileName))

{

BmpOptions bmpOptions = new BmpOptions();

var dwfRasterizationOptions = new DwfRasterizationOptions();

bmpOptions.VectorRasterizationOptions = dwfRasterizationOptions;

dwfRasterizationOptions.CenterDrawing = true;

dwfRasterizationOptions.PageHeight = 500;

dwfRasterizationOptions.PageWidth = 500;

dwfRasterizationOptions.Layouts = new string[] { "Model" };

// export

string outPath = fileName + ".bmp";

image.Save(outPath, bmpOptions);

}

CADNET-240 Support DWF format Export to PDF

 string fileName = GetFileFromDesktop("APFH Floor Plan.dwf");

using (Aspose.CAD.Image image = Aspose.CAD.Image.Load(fileName))

{

var pdfOptions = new PdfOptions();

var dwfRasterizationOptions = new DwfRasterizationOptions();

pdfOptions.VectorRasterizationOptions = dwfRasterizationOptions;

dwfRasterizationOptions.CenterDrawing = true;

dwfRasterizationOptions.PageHeight = 500;

dwfRasterizationOptions.PageWidth = 500;

dwfRasterizationOptions.Layouts = new string[] { "Model" };

// export

string outPath = fileName + ".pdf";

image.Save(outPath, pdfOptions);

}

CADNET-197 Add support for DXF and DWG file formats in FileFormat enumeration. Difference of return value of Image.GetFileFormat method for DWG and DXF (DXF goes with DXF prefix)

 var dxf = GetDxfFile(@"AllEntities5.dxf");

var dwg = GetDwgFile(@"APFH Floor Plan (DWG).dwg");

var dxfFormat = Image.GetFileFormat(dxf); // Aspose.CAD.FileFormat.DXFCadR2010

var dwgFormat = Image.GetFileFormat(dwg); // Aspose.CAD.FileFormat.CadR2004

CADNET-68 Support MLeader entity for dwg format MLeader entity

 string file = "file path";

using (Image image = Image.Load(file))

{

// Test

CadImage cadImage = (CadImage)image;

Assert.AreNotEqual(cadImage.Entities.Length, 0);

CadMLeader cadMLeader = (CadMLeader)cadImage.Entities[0];

Assert.AreEqual(cadMLeader.StyleDescription, "Standard");

Assert.AreEqual(cadMLeader.LeaderStyleId, "12E");

Assert.AreEqual(cadMLeader.ArrowHeadId1, "639");

Assert.AreEqual(cadMLeader.LeaderLineTypeID, "14");

CadMLeaderContextData context = cadMLeader.ContextData;

Assert.AreEqual(context.ArrowHeadSize, 30.0, 0.1);

Assert.AreEqual(context.BasePoint.X, 481, 1);

Assert.AreEqual(context.ContentScale, 1.0, 0.01);

Assert.AreEqual(context.DefaultText.Value, "This is multileader with huge text\\P{\\H1.5x;6666666666666666666666666666\\P}bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");

Assert.AreEqual(context.HasMText, true);

CadMLeaderNode mleaderNode = context.LeaderNode;

Assert.AreEqual(mleaderNode.LastLeaderLinePoint.X, 473, 1);

CadMLeaderLine leaderLine = mleaderNode.LeaderLine;

Assert.AreEqual(leaderLine.BreakEndPoint, null);

Assert.AreEqual(leaderLine.BreakPointIndex.Value, 0);

Assert.AreEqual(leaderLine.BreakStartPoint, null);

Assert.AreEqual(leaderLine.LeaderLineIndex.Value, 0);

Assert.AreEqual(leaderLine.LeaderPoints.Count, 4);

Assert.AreEqual(mleaderNode.BranchIndex, 0);

Assert.AreEqual(mleaderNode.DogLegLength, 8.0, 0.1);

Assert.AreEqual(context.HasMText, true);

Assert.AreEqual(context.TextAttachmentType.Value, 1);

Assert.AreEqual(context.TextBackgroundColor.Value, 18);

Assert.AreEqual(context.TextHeight, 20.0, 0.1);

Assert.AreEqual(context.TextStyleID.Value, "11");

Assert.AreEqual(context.TextRotation.Value, 0.0, 0.01);

Assert.AreEqual(cadMLeader.ArrowHeadId1, "639");

Assert.AreEqual(cadMLeader.LeaderType, 1);

Assert.AreEqual(cadMLeader.BlockContentColor, 0);

Assert.AreEqual(cadMLeader.LeaderLineColor, 0);

Assert.AreEqual(cadMLeader.TextHeight, 1.0, 0.01);

}