MMpy.FileStruct.delete_field

Syntax

structure.delete_field(field_id)

Description

Deletes a field from a file structure object.

Parameters

Name
Type
Description

field_id 

int ID of the field.

Returns

Type
Description
bool Returns True if the field was deleted, False otherwise.

See Also

MMpy.FileStruct.fields

Notes

To determine the field ID to use, use MMpy.FileStruct.fields to obtain the mappings of names to ID's.

Examples

file = MMpy.File()
...
structure = file.structure

field_id = structure.fields['TEMPVALUE']
structure.delete_field(field_id)

file.structure = structure
file.close()

Resource ID

IDPH_FILESTRUCT_REMOVEFLD