# How to implement AutoCAD highlight effect?

**URL:** <https://forum.techsoft3d.com/t/how-to-implement-autocad-highlight-effect/4681>\
**Category:** HOOPS Visualize Desktop\
**Created:** [May 22, 2025, 7:58am UTC](https://forum.techsoft3d.com/t/how-to-implement-autocad-highlight-effect/4681 "2025-05-22T07:58:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mini](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@mini](https://forum.techsoft3d.com/u/mini)\
**Post date:** [May 22, 2025, 7:58am UTC](https://forum.techsoft3d.com/t/how-to-implement-autocad-highlight-effect/4681/1 "2025-05-22T07:58:40Z")

</div>

When I select an entity in AutoCAD, the selected entity is expressed in an offset shape and fluorescent color around the entity. I wonder if there is a way to create this selection effect. How can I create the AutoCAD selection effect?

---

<div class="post-metadata">

**Author:** ![simon](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@simon](https://forum.techsoft3d.com/u/simon)\
**Post date:** [June 4, 2025, 10:01am UTC](https://forum.techsoft3d.com/t/how-to-implement-autocad-highlight-effect/4681/2 "2025-06-04T10:01:36Z")

</div>

Hello mini,

I will be looking into this ticket and will get back to you.

Best Regards,  
Simon

---

<div class="post-metadata">

**Author:** ![simon](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@simon](https://forum.techsoft3d.com/u/simon)\
**Post date:** [June 10, 2025, 5:20pm UTC](https://forum.techsoft3d.com/t/how-to-implement-autocad-highlight-effect/4681/3 "2025-06-10T17:20:37Z")

</div>

Hello Mini,

Are you using HOOPS HPS or HOOPS 3DF API?

We do not have the halo highlight effect your looking for but I might be able get something closer.

Best Regards,  
Simon

---

<div class="post-metadata">

**Author:** ![simon](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@simon](https://forum.techsoft3d.com/u/simon)\
**Post date:** [June 10, 2025, 11:09pm UTC](https://forum.techsoft3d.com/t/how-to-implement-autocad-highlight-effect/4681/4 "2025-06-10T23:09:16Z")

</div>

Hello Mini,

Here is sample code in HPS.

```auto
	HPS::PortfolioKey myPortfolio = GetCanvas().GetFrontView().GetPortfolioKey();

    HPS::NamedStyleDefinition halo_style = myPortfolio.DefineNamedStyle("green halo", HPS::Database::CreateRootSegment());
	halo_style.GetSource().GetVisibilityControl().SetFaces(false).SetEdges(true).SetLights(false);
	halo_style.GetSource().GetMaterialMappingControl().SetEdgeColor(RGBColor(0.0f, 1.0f, 0.0f));
	halo_style.GetSource().GetDrawingAttributeControl().SetDepthRange(0.9f, 1.0f);
	halo_style.GetSource().GetEdgeAttributeControl().SetWeight(20.0);
    GetCanvas().GetFrontView().GetSegmentKey().GetPortfolioControl().Push(myPortfolio);

	HPS::WindowKey myWindowKey = GetCanvas().GetWindowKey();

    HPS::SelectionOptionsKit selectionOptions;
    selectionOptions.SetAlgorithm(HPS::Selection::Algorithm::Analytic);
    selectionOptions.SetLevel(HPS::Selection::Level::Entity);

    // the origin will be the selection point
    HPS::Point selectionPoint(0, 0, 0);

    HPS::SelectionResults selectionResults;
    size_t numSelectedItems = myWindowKey.GetSelectionControl()
					.SelectByArea(HPS::Rectangle(-1, 1, -1, 1), selectionOptions, selectionResults);

    HighlightOptionsKit hok;
    hok.SetStyleName("green halo");

	myWindowKey.GetHighlightControl().Highlight(selectionResults, hok);

	GetCanvas().UpdateWithNotifier().Wait();

```

Let us know if you have any other questions.

Best Regards,  
Simon
