Attribute Tables API
Module: mls.table. This page documents 2 public functions with exact tool IDs, complete parameters, Parameters fields, and examples.
Back to the Script Tool API Reference
Functions
table_import— Import table file into the current projectexport— Export table to external file
table_import
Import table file into the current project
- Exact tool ID:
table_import - Recommended call:
mls.table.table_import(...) - Required parameters:
gpkg_path,file_list
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
gpkg_path |
string |
Yes | — |
GPKG database path |
layer_type |
string |
No | 'table' |
Layer type, default: table |
file_list |
array |
Yes | — |
An array containing the input table paths |
Example
from gvscript import mls
result = mls.table.table_import(
gpkg_path='D:/data/input.LiData',
layer_type='table',
file_list=['example'],
)
print(result.ok, result.output, result.message)
export
Export table to external file
- Exact tool ID:
table_export - Recommended call:
mls.table.export(...) - Required parameters:
gpkg_path,file_list,output_path
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
gpkg_path |
string |
Yes | — |
GPKG database path |
layer_type |
string |
No | 'table' |
Layer type, default: table |
output_path |
array |
Yes | — |
Custom output path list for batch export |
file_list |
array |
Yes | — |
An array containing the input table paths, Path format should be:D:/data/current_project.lidpkg/table1 |
Example
from gvscript import mls
result = mls.table.export(
output_path=['D:/data/output'],
gpkg_path='D:/data/input.LiData',
layer_type='table',
file_list=['example'],
)
print(result.ok, result.output, result.message)