evo.objects.typed.base.object_from_reference
object_from_reference(context: IContext, reference: ObjectReference | str) -> _BaseObject
Download a GeoscienceObject from an ObjectReference and create the appropriate typed instance.
This function downloads the object from a full ObjectReference (which can contain path, UUID, version, etc.) and automatically selects the correct typed class (e.g., PointSet, Regular3DGrid) based on the object's sub-classification.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
IContext
|
The context for connecting to Evo APIs. |
required |
reference
|
ObjectReference | str
|
The ObjectReference identifying the object to download. |
required |
Returns:
| Type | Description |
|---|---|
_BaseObject
|
A typed GeoscienceObject instance (PointSet, Regular3DGrid, etc.). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no typed class is found for the object's sub-classification. Example::
|