v2.23
IObjectWithLayeredMaterial Interface Reference

Represents an object which has an associated layered material. More...

Inheritance diagram for IObjectWithLayeredMaterial:

Public Member Functions

HRESULT GetLayeredMaterialIdGroupPair ([out, retval] LayeredMaterialIdGroupPair *pLayeredMaterialGroupIdPair)
 Gets the associated layered material ID and group. More...
 
HRESULT HasLayeredMaterial ([out, retval] VARIANT_BOOL *pResult)
 Queries if the object has a layered material associated with it. More...
 
HRESULT GetLayers ([out, retval] ILayerCollection **ppLayerCollection)
 Gets the material layers. More...
 

Properties

int LayeredMaterialId [get]
 The layered material ID. If the object has no material associated with it (HasLayeredMaterial() returns FALSE), a special value is returned, for which ILayeredMaterialManager::GetLayeredMaterial() returns nullptr.
 

Detailed Description

Represents an object which has an associated layered material.

This interface can be obtained from IModelObject using standard COM QueryInterface method.

Member Function Documentation

◆ GetLayeredMaterialIdGroupPair()

HRESULT IObjectWithLayeredMaterial::GetLayeredMaterialIdGroupPair ( [out, retval] LayeredMaterialIdGroupPair pLayeredMaterialGroupIdPair)

Gets the associated layered material ID and group.

Deprecated:
This method is deprecated, use LayeredMaterialId instead
Returns
A layered material ID and group. If the object has no material associated with it (HasLayeredMaterial() returns FALSE), a special value is returned, for which ILayeredMaterialManager::GetLayeredMaterial() returns nullptr.

◆ GetLayers()

HRESULT IObjectWithLayeredMaterial::GetLayers ( [out, retval] ILayerCollection **  ppLayerCollection)

Gets the material layers.

Returns
A collection of material layers. If the object has no material associated with it (HasLayeredMaterial() returns FALSE), an empty collection is returned.

◆ HasLayeredMaterial()

HRESULT IObjectWithLayeredMaterial::HasLayeredMaterial ( [out, retval] VARIANT_BOOL *  pResult)

Queries if the object has a layered material associated with it.

Returns
TRUE if the object has an associated layered material, FALSE otherwise.