Create an asset mapping
- async AsyncCogniteClient.three_d.asset_mappings.create(
- model_id: int,
- revision_id: int,
- asset_mapping: ThreeDAssetMapping | ThreeDAssetMappingWrite | Sequence[ThreeDAssetMapping] | Sequence[ThreeDAssetMappingWrite],
Create 3d node asset mappings.
- Parameters:
model_id (int) – Id of the model.
revision_id (int) – Id of the revision.
asset_mapping (ThreeDAssetMapping | ThreeDAssetMappingWrite | Sequence[ThreeDAssetMapping] | Sequence[ThreeDAssetMappingWrite]) – The asset mapping(s) to create.
- Returns:
The created asset mapping(s).
- Return type:
Example
Create new 3d node asset mapping:
>>> from cognite.client import CogniteClient >>> from cognite.client.data_classes import ThreeDAssetMappingWrite >>> my_mapping = ThreeDAssetMappingWrite(node_id=1, asset_id=1) >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> res = client.three_d.asset_mappings.create( ... model_id=1, revision_id=1, asset_mapping=my_mapping ... )