# Invoking sphere creation with C++ code only

**URL:** https://discourse.paraview.org/t/invoking-sphere-creation-with-c-code-only/13905
**Category:** Development
**Created:** [February 9, 2024, 12:57pm UTC](https://discourse.paraview.org/t/invoking-sphere-creation-with-c-code-only/13905 "2024-02-09T12:57:19Z")
**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 9, 2024, 12:57pm UTC](https://discourse.paraview.org/t/invoking-sphere-creation-with-c-code-only/13905/1 "2024-02-09T12:57:19Z")

</div>

Hello, dear Paraview developers!

```auto
  vtkSMSession* session = vtkSMSession::New();
  vtkSMSessionProxyManager* pxm = session->GetSessionProxyManager();
  vtkSMProxy* proxy = pxm->NewProxy("sources", "SphereSource");
  vtkSMPropertyHelper(proxy, "Radius").Set(4.2);
  vtkSMPropertyHelper(proxy, "Radius").Set(8.4);
  proxy->Delete();
  session->Delete();

```

I was trying to invoke sphere creation inside from my filter’s widget, following [ParaView/Remoting/ServerManager/Testing/Cxx/vtkSMPropertyHelperTest.cxx at 6f7d870595bf68b02dcf63c1a56adf6eb53dd2f1 · OpenChemistry/ParaView · GitHub](https://github.com/OpenChemistry/ParaView/blob/6f7d870595bf68b02dcf63c1a56adf6eb53dd2f1/Remoting/ServerManager/Testing/Cxx/vtkSMPropertyHelperTest.cxx#L30) and dear Mathieu advices, but this code has not created any sphere.

Could you please give me an advice on how to accomplish it?

Best regards,  
Michail
