Skip To Content

FieldDefinition.Remove (.NET)

FieldDefinition.Remove 方法用于从文档要素图层中移除字段定义,但实体保持不变。 无法移除 web 要素图层的字段定义。

声明

public bool Esri.ArcGISForAutoCAD.FieldDefinition.Remove(Document doc, string flName, string name)

参数

类型名称描述必填

文档

doc

要进行操作的 AutoCAD 文档。

必填

string

flName

工程图中的现有文档要素图层名称。

必填

string

name

现有要素图层属性字段名称。

必填

返回

类型描述

bool

如果已成功移除字段定义,则为 true

错误条件备注

如果参数无效,则此方法可能会抛出异常或者返回 falsenull

示例

打印在 Parks 要素图层中移除 Undev 字段成功。

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

// Remove the field definition
var success = Esri.ArcGISForAutoCAD.FieldDefinition.Remove(doc, "Parks", "Undev");

// Print the success
doc.Editor.WriteMessage(success.ToString());

/* Example output
True
*/

另请参阅

esri_fielddef_remove - 此 AutoLISP 函数用于从文档要素图层中移除字段定义,但实体保持不变。