mapteksdk.data.io module¶
Provides functions for the importing and exporting data.
-
mapteksdk.data.io.
import_00t
(path, unit=<DistanceUnit.metre: 307>)¶ Import a Maptek Vulcan Triangulation file (00t) into the project.
- Parameters
path (str) – Path to file to import.
unit (DistanceUnit) – The unit used when exporting the file.
- Returns
ObjectID – The ID of the imported object.
None – If there was an error importing the object.
- Raises
FileNotFoundError – If the file does not exist.
TypeError – If the unit is not an instance of DistanceUnit.
RuntimeError – If there is a problem importing the file.
Notes
The imported object is not automatically placed inside a container. A call to project.add_object() is required to add it to a container.
-
mapteksdk.data.io.
export_00t
(object_id, path, unit=<DistanceUnit.metre: 307>)¶ Export the object referenced by the object ID to a Maptek Vulcan Triangulation file (00t).
- Parameters
object_id (ObjectID) – The ID of the object to export to the 00t file.
path (str) – Where to save the exported 00t.
unit (DistanceUnit) – Unit to use when exporting the file.
- Returns
True if successful otherwise False.
- Return type
bool
- Raises
TypeError – If the unit is not an instance of DistanceUnit.
RuntimeError – If there is a problem exporting the file.
-
mapteksdk.data.io.
import_bmf
(path, unit=<DistanceUnit.metre: 307>)¶ Import a Maptek Block Model File (bmf) into the project.
- Parameters
path (str) – Path to file to import.
unit (DistanceUnit) – Unit to use when importing the file.
- Returns
ObjectID – The ID of the imported object.
None – If there was an error importing the object.
- Raises
TypeError – If the unit is not an instance of DistanceUnit.
FileNotFoundError – If the file does not exist.
RuntimeError – If there is a problem importing the file.
-
mapteksdk.data.io.
export_bmf
(object_id, path, unit=<DistanceUnit.metre: 307>)¶ Export a block model to a Maptek Block Model File (bmf).
- Parameters
object_id (ObjectID) – The block model to export as a bmf file.
path (str) – Where to save the exported bmf file.
unit (DistanceUnit) – Unit to use when exporting the file.
- Returns
True if successful otherwise False.
- Return type
bool
- Raises
TypeError – If the unit is not an instance of DistanceUnit.
RuntimeError – If there is a problem exporting the file.
-
mapteksdk.data.io.
import_maptekobj
(path)¶ Import a Maptek Object file (maptekobj) into the project.
- Parameters
path (str) – Path to file to import.
- Returns
ObjectID – The ID of the imported object.
None – If there was an error importing the object.
- Raises
FileNotFoundError – If the file does not exist.
RuntimeError – If there is a problem importing the file.
-
mapteksdk.data.io.
export_maptekobj
(object_id, path)¶ Export an object to a Maptek Object file (maptekobj).
- Parameters
object_id (ObjectID) – The ID of the object to export to a maptekobj file.
path (str) – Where to save the exported maptekobj file.
- Returns
True if successful otherwise False.
- Return type
bool
- Raises
RuntimeError – If there is a problem exporting the file.