API Reference > OdDb Classes > OdDbLayerTableRecord Class > OdDbLayerTableRecord Methods > setPlotStyleName Method > OdDbLayerTableRecord::setPlotStyleName Method (OdDbObjectId&, OdDbObjectId&)
OdDbLayerTableRecord::setPlotStyleName Method (OdDbObjectId&, OdDbObjectId&)
Syntax
C++
void setPlotStyleName(const OdDbObjectId& idPlotStyle, const OdDbObjectId& idViewport);
Parameters 
Description 
const OdDbObjectId& idPlotStyle 
[in] Object ID of the place holder object to associate it with the layer, or OdDb::kNull to disassociate the layer and plot style.  
const OdDbObjectId& idViewport 
[in] Object ID of the viewport in which the layer must have the specific plot style. 

Sets the ID of the place holder object for the layer record object (DXF 390). This method associates layer and plot style. The ID is an ObDbObjectId instance. This plot style is used when the PlotStyle property of an entity belonged to this layer is set to ByLayer value. The same entity can be rendered using different plot styles in different viewports. 

 

The same layer can have different plot styles in different viewports. Therefore this method is overdriven. The method with two arguments sets the specific plot style for the viewport using the plot style ID.

Example of Working with the Layer Record Object 

Specific Properties of Layers 

OdDbPlaceHolder class 

OdDbLayerTableRecord::plotStyleName(), OdDbLayerTableRecord::plotStyleNameId() methods

Copyright © 2002–2020. Open Design Alliance. All rights reserved.