Autodesk.AutoCAD.DatabaseServices Namespace > Entity Class > Entity Methods > Highlight Method > Highlight() Method
Entity.Highlight() Method   
Description

 

 

Function usage

This function highlights the entire entity on the screen. 

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

 

Warning

If the entity on which this method is called has its graphics queued for regeneration (that is, changes have been made to the entity but have not yet been reflected on screen), then this method will not cause a highlight to occur. Also, calling this method on an entity that's open for write and whose graphics are queued for regeneration may terminate AutoCAD. 

To avoid this limitation, before calling Highlight(), you should flush the entity's graphics by either calling the entity's Draw() method, or calling the TransactionManager.FlushGraphics() function. 

 

Function implementation in derived classes

The Entity.Highlight() implementation does all the work necessary to highlight any subentities. 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 highlight subentities. 

If this method is overridden and it is supposed to highlight subentities, then the Entity.Highlight() method will need to be invoked at some point within this function in order to do the actual highlighting.

Visual Basic
Public Function Highlight() As void
C#
public void Highlight();
Links
   Comments?