This example uploads a raw Block Model. To see what other metadata should be provided along with the block model files, please check the Extended Block Model Metadata topic.


# Create raw mesh entity

# The variable "crs" contains the CRS for the project


result = vf.create_entity_raw(

    project=project

    type=vf.entity_type.RawBlockModel

    name="Raw BlockModel"

    fields={},

    crs=crs)

if not result.success:

    print(result.error_info)

    exit(3)

rawbm_id = result.id



# upload metadata

files = {'file'open('./mockdata/process.meta''rb')}

result = vf.attach_files(

    project=project

    id=rawbm_id,

    files=files)

if not result.success:

    print(result.error_info)

    exit(4