Share

AcDbEntity::setTransparency

C++

virtual Acad::ErrorStatus setTransparency(
    const AcCmTransparency& trans, 
    Adesk::Boolean doSubents = true
);

Description

This function sets the transparency value for the entity.

If the entity owns subentities and is Adesk::kTrue, the transparency change is applied to the subentities as well. The only built-in entities for which kTrue has an effect are AcDb2dPolyline, AcDb3dPolyline, AcDbPolyFaceMesh, and AcDbPolygonMesh.

If this function is overridden and wishes to set the color of the entity, the override must call AcDbEntity::setTransparency(), passing on the trans and doSubents arguments.

It is also possible for this function's implementation to deal directly with any subentities and pass a doSubents value of Adesk::kFalse to AcDbEntity::setTransparency().

If the transparency-setting operation is successful, the function returns Acad::eOk. Return values for errors are up to the implementer.

Parameters

Parameters Description
trans Input transparency object to set
doSubents Input Boolean: true to propagate the change to any subentities the entity may own; false not to propagate

Links

AcDbEntity

Was this information helpful?