StockMaterialLibrary.updateStockMaterial Method

Parent Object: StockMaterialLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterialLibrary.h>

Description

Update a stockMaterial in the library. The library overrides the URL by given stockMaterial. Throws an error if the URL does not already point to an existing stockMaterial.

Syntax

"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.

returnValue = stockMaterialLibrary_var.updateStockMaterial(url, stockMaterial)
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.

#include <Cam/StockMaterials/StockMaterialLibrary.h>

returnValue = stockMaterialLibrary_var->updateStockMaterial(url, stockMaterial);
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.

returnValue = stockMaterialLibrary_var.updateStockMaterial(url, stockMaterial);

Return Value

Type Description
boolean Returns true if asset was updated successfully, false otherwise.

Parameters

Name Type Description
url URL The URL to the existing asset in the library that should be updated.
stockMaterial StockMaterial The stockMaterial that should be persisted.

Version

Introduced in version September 2024