Skip To Content

FeatureLayer.Get (.NET)

FeatureLayer.Get メソッドは、フィーチャ レイヤー プロパティのディクショナリーを返します。

宣言

public Dictionary<string, string> Esri.ArcGISForAutoCAD.FeatureLayer.Get(Document doc, string flName)

パラメーター

タイプ名前説明必須

ドキュメント

doc

操作対象の AutoCAD ドキュメント。

必須

string

flName

ドローイング内の既存のフィーチャ レイヤー名。

必須

リターン

タイプ説明

Dictionary<string, string>

フィーチャ レイヤー プロパティのディクショナリー。次を含めることができます:

  • Key: NAME, Value: フィーチャ レイヤーの名前。
  • Key: GEOMTYPE, Value: フィーチャ レイヤーのジオメトリー タイプ ("Polygon"、"Polyline"、"Point"、"Multipatch"、または "Annotation")。
  • Key: TYPEFIELD, Value: フィーチャ レイヤーにサブタイプが含まれる場合は、サブタイプの基準となるフィールドの名前になります。サブタイプが含まれない場合は、省略されます。
  • Key: FLTYPE, Value: ドキュメントまたは Web フィーチャ レイヤー タイプ。

エラー条件に関する注記

パラメーターが無効な場合、このメソッドは例外をスローするか、null を返すことがあります。

Buildings フィーチャ レイヤーのフィーチャ レイヤー プロパティを印刷します。

// Initialize
var doc = Application.DocumentManager.MdiActiveDocument;

// Get the feature layer properties
var buildingsProperties = Esri.ArcGISForAutoCAD.FeatureLayer.Get(doc, "Buildings");

// Print the properties
foreach (var property in buildingsProperties)
{
  doc.Editor.WriteMessage("\nKey = {0}, Value = {1}", property.Key, property.Value);
}

/* Example output
Key = NAME, Value = Buildings
Key = GEOMTYPE, Value = Polygon
Key = TYPEFIELD, Value =
Key = FLTYPE, Value = Document
*/

次もご参照ください。

esri_featurelayer_get - フィーチャ レイヤー プロパティの関連リストを返す AutoLISP 関数です。