نقشههای DWT
Contents
[
Hide
]پشتیبانی از فایلهای DWT
Aspose.CAD برای جاوا به توسعهدهندگان اجازه میدهد تا فایلهای DWT را بارگذاری و ذخیره کنند. کد نمونه در زیر برای دستیابی به این قابلیت ارائه شده است.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cad/Aspose.CAD-for-Java | |
CadImage image = (CadImage)Image.load("example.dwt"); | |
{ | |
for (CadBaseEntity entity : image.getEntities()) | |
{ | |
// ... | |
} | |
} |
تمایز فرمتهای DWT و DWG
در زیر کدی آورده شده است که نحوه تمایز فرمتهای DWT و DWG را با استفاده از Aspose.CAD برای جاوا نشان میدهد.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String dataDir = Utils.getDataDir(DistinguishDWTAndDWGFormats.class) + "DWTDrawings/"; | |
String fileName2 = dataDir +"Sample.dwg"; | |
String fileName3 = dataDir +"sample.dwt"; | |
String fileName4 = dataDir +"sample.dxf"; | |
long formatType2 = Image.getFileFormat(fileName2); | |
Assert.areEqual(formatType2 >= FileFormat.CadR010 && formatType2 <= FileFormat.CadR2013); | |
long formatType3 = Image.getFileFormat(fileName3); | |
Assert.areEqual(formatType3 >= FileFormat.DwtCadR010 && formatType3 <= FileFormat.DwtCadR2013); | |
long formatType4 = Image.getFileFormat(fileName4); | |
Assert.areEqual(formatType4 >= FileFormat.DXFCadR010 && formatType4 <= FileFormat.DXFCadR2013); |