รับค่าแอตทริบิวต์บล็อกของการอ้างอิงภายนอก

รับค่าแอตทริบิวต์บล็อก

Aspose.CAD สำหรับ .NET API ช่วยให้คุณสามารถรับการอ้างอิงภายนอกของแอตทริบิวต์บล็อกได้ Aspose.CAD API เปิดเผย XRefPathName เพื่อรับการอ้างอิงภายนอกของแอตทริบิวต์บล็อกใน CadBlockDictionary คอลเลกชัน ด้านล่างนี้เป็นการสาธิตโค้ดในการรับการอ้างอิงภายนอกของแอตทริบิวต์บล็อก

// The path to the documents directory.
string MyDir = RunExamples.GetDataDir_DWGDrawings();
string sourceFilePath = MyDir + "sample.dwg";
// Load an existing DWG file as CadImage.
using (Aspose.CAD.FileFormats.Cad.CadImage cadImage = (Aspose.CAD.FileFormats.Cad.CadImage)Aspose.CAD.Image.Load(sourceFilePath))
{
System.Console.WriteLine(cadImage.BlockEntities["*MODEL_SPACE"].XRefPathName);
}