Get Block Attribute Value Of External Reference

Get Block Attribute Value

Aspose.CAD for .NET API allows you to get an external reference of a block attribute. Aspose.CAD API exposes XRefPathName property to get the external reference of a block attribute in a CadBlockDictionary collection. Following is the code demonstration of getting external reference of a block attribute.

// 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);
}