رسومات 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")); | |