MMpy.BlockModel.add_block

Syntax

blockmodel.add_block(block_centre, block_size)

Description

Adds a block with the given centre and size.

Parameters

Name
Type
Description

block_centre

MMpy.Point3D The block centre coordinates.

block_size

MMpy.Point3D The block size.

Returns

Type
Description
bool Returns True if the block value was successfully added, False otherwise.

See Also

MMpy.Point3D

Notes

Record IDs are 1-based, meaning passing an index of 1 will return the first record.

Examples

blockmodel_filename = MMpy.Project.path() + 'Block_Model.DAT'
x_field, y_field, z_field = 'EAST', 'NORTH', 'RL'

blockmodel = MMpy.BlockModel()
blockmodel.open(blockmodel_filename, x_field, y_field, z_field)

blockmodel.add_block(MMpy.Point3D(0.0, 0.0, 0.0), MMpy.Point3D(10.0, 10.0, 10.0))

blockmodel.close()

Resource ID

IDPH_BM_ADD_BLOCK