Skip To Content

FieldDefinition.Remove (.NET)

The FieldDefinition.Remove method removes the field definition from the document feature layer but does nothing to the entities. You cannot remove the field definitions of web feature layers.

Declaration

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

Parameters

TypeNameDescriptionRequired

Document

doc

The AutoCAD document to act on.

required

string

flName

An existing document feature layer name in the drawing.

required

string

name

An existing document feature layer attribute field name.

required

Returns

TypeDescription

bool

true if the field definition was removed successfully

Remarks on error conditions

This method may throw an exception or return false or null if a parameter is invalid.

Example

Print the success of removing the Undev field from the Parks feature layer.

// 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
*/

See also

esri_fielddef_remove—An AutoLISP function that removes the field definition from the document feature layer but does nothing to the entities.