外部参照のブロック属性値を取得

ブロック属性値を取得する

Aspose.CAD for .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);
}