# How to make Selection from C++ visible?

**URL:** https://discourse.paraview.org/t/how-to-make-selection-from-c-visible/13923
**Category:** Development
**Created:** [February 13, 2024, 12:08pm UTC](https://discourse.paraview.org/t/how-to-make-selection-from-c-visible/13923 "2024-02-13T12:08:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![joint](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@joint](https://discourse.paraview.org/u/joint)
#### Post date: [February 13, 2024, 12:08pm UTC](https://discourse.paraview.org/t/how-to-make-selection-from-c-visible/13923/1 "2024-02-13T12:08:13Z")

</div>

Hello dear Paraview developers!

I have used the following code to select the points by IDs from the custom widget

```auto
    vtkSelection* sel = vtkSelection::New();
    vtkNew<vtkIdTypeArray> ids;
    ids->SetNumberOfComponents(1);

    for (unsigned int i = 0; i < 500; i++)
    {
        ids->InsertNextValue(i);
    }
    vtkNew<vtkSelectionNode> selectionNode;
    selectionNode->SetFieldType(vtkSelectionNode::POINT);
    selectionNode->SetContentType(vtkSelectionNode::INDICES);
    selectionNode->SetSelectionList(ids);
    sel->AddNode(selectionNode);

    vtkSMProxy* selproxy = vtkSMSelectionHelper::NewSelectionSourceFromSelection(given_proxy->GetSession(), sel);

    selproxy->UpdateVTKObjects();

```

But after this, no selection on the screen is visible  
Where given\_proxy has been passed to my custom widget in constuctor

Dear Paraview developers, could you please help me what to do in order to make this selection visible?

Best regards
