Share

AcDbEntity::setPlotStyleName

C++

virtual ACDBCORE2D_PORT Acad::ErrorStatus setPlotStyleName(
    const ACHAR* newName, 
    Adesk::Boolean doSubents = true
);

Description

This function searches the PlotStyleName dictionary for an entry with the name that matches newName and if found, sets the entity to use that plotStyleName entry. Because a lookup in the PlotStyleName dictionary is required, the entity must be database-resident for this method to succeed. The names ByLayer and ByBlock are allowed as well as user-defined names.

If the entity owns subentities and doSubents == Adesk::kTrue, then the change will be applied to the subentities as well. For an AcDbBlockReference entity, this method will also update any associated AcDbSequenceEnd subentity regardless of the doSubents setting.

Returns Acad::eOk if successful. If the entity is not database-resident, then Acad::eNoDatabase will be returned. If there is no entry in the PlotStyleName dictionary for newName, then Acad::eKeyNotFound will be returned.

The plotStyleName value is used for DXF group code 390.

Parameters

Parameters Description
newName Input plotStyleName string to be used by the entity
doSubents Reserved for future use

Links

AcDbEntity

Was this information helpful?