Share

AcDbEntity::unhighlight

C++

ACDBCORE2D_PORT ADESK_SEALED_VIRTUAL Acad::ErrorStatus unhighlight(
    const AcDbFullSubentPath& subId = kNullSubent, 
    const Adesk::Boolean highlightAll = false
) const;

Description

Function usage

This function uses the AcDbFullSubentPath id to determine which subentity in the entity is desired. It then unhighlights that subentity on screen. If no AcDbFullSubentPath argument is provided, then the entire entity will be unhighlighted.

Typically the AcDbFullSubentPath object passed in via subId will be obtained from the entity's AcDbEntity::getSubentPathsAtGsMarker() method. This guarantees that it is fully and properly filled in.

This function uses the entity's getGsMarkersAtSubentPath() method to get the GS markers associated with subId. If that function does not return Acad::eOk, then this function will fail and return whatever ErrorStatus was returned by getGsMarkersAtSubentPath().

If this function succeeds, then it will return Acad::eOk.

It is not necessary to balance each highlight() function call with a corresponding call to unhighlight(). Calling the unhighlight() function will unhighlight the entity designated by subId regardless of how many times the highlight function has been called on it.

Function implementation in derived classes

The AcDbEntity::unhighlight() implementation does all the work necessary to unhighlight any subentities that correspond to the subIdFullSubentPath. So, there is no need to override this method unless you wish to do some pre-or post processing, or you wish to disable the ability to unhighlight subentities.

If this method is overridden and it is supposed to unhighlight subentities, then the AcDbEntity::unhighlight() method needs to be invoked at some point within this function in order to do the actual unhighlighting.

Within the AcDbEntity::unhighlight() method, the getGsMarkersAtSubentPath() method of this entity is called to translate the FullSubentPath into the corresponding GS markers. So, if this function is to succeed, the getGsMarkersAtSubentPath() method needs to be implemented as well.

For more information on the subIdAcDbFullSubentPath argument, see the documentation on the AcDbEntity::getGsMarkersAtSubentPath() or AcDbEntity::getSubentPathsAtGsMarker() methods.

Parameters

Parameters Description
subId Input AcDbFullSubentPath that identifies which subentity to unhighlight
highlightAll Input Boolean indicating whether to unhighlight in all viewports

Links

AcDbEntity

Was this information helpful?