MMpy.BlockModel.get_field_id

Syntax

blockmodel.get_field_id(field_name)

Description

Returns a field id from the field name. The user should not make any assumptions on possible field ID values.

Parameters

Name
Type
Description

field_name 

str The name of the field to convert to its ID.

Returns

Type
Description
int The ID of the named field, or -1 if it doesn't exist or is invalid.

Examples

blockmodel = MMpy.BlockModel()
blockmodel.open(...)
value_field_id = blockmodel.get_field_id('VALUE')

Resource ID

IDPH_BM_GET_FIELD_ID