การวาด DWT
Contents
[
Hide
]การสนับสนุนไฟล์ DWT
Aspose.CAD สำหรับ .NET ช่วยให้สามารถโหลดและบันทึกไฟล์ DWT ได้ ตัวอย่างโค้ดด้านล่างแสดงวิธีการทำเช่นนี้
ตัวอย่างโค้ด
This file contains 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
// The path to the documents directory. | |
string MyDir = RunExamples.GetDataDir_ConvertingCAD(); | |
using (CadImage image = (CadImage)Image.Load(MyDir+"example.dwt")) | |
{ | |
foreach (CadBaseEntity entity in image.Entities) | |
{ | |
//do your work here | |
} | |
} | |
} |
แยกความแตกต่างระหว่างรูปแบบ DWT และ DWG
ต่อไปนี้คือโค้ดที่แสดงวิธีการแยกความแตกต่างระหว่างรูปแบบ DWT และ DWG โดยใช้ Aspose.CAD สำหรับ .NET
ตัวอย่างโค้ด
This file contains 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
var formatTypeDwt = Image.GetFileFormat(GetFileFromDesktop("sample.dwt")); | |
Assert.IsTrue(formatTypeDwt.ToString().ToLower().Contains("dwt")); | |
var formatTypeDwg = Image.GetFileFormat(GetFileFromDesktop("sample.dwg")); | |
Assert.IsTrue(formatTypeDwg.ToString().ToLower().Contains("dwg")); | |