How to implement AutoCAD highlight effect?

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?

Hello mini,

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

Best Regards,
Simon

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

Hello Mini,

Here is sample code in HPS.

	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