Multiple Source Selection

Is there a way to retrieve multiple pipeline selections through the paraview.simple module?

I’ve seen documentation online that says this is not possible, but it must be at least somewhat supported under the hood for use with filters like Append Attributes right?

I ask because I would like to build a macro that uses multiple selections from the user. And, ideally, be able to tell the order of selection.

What do you mean by multiple pipeline selections ?

I have been using the following code to get a list of all selected sources (not sure if that’s the right way to do it):

model = servermanager.ProxyManager(None).GetSelectionModel("ActiveSources")
proxies = [model.GetSelectedProxy(i) for i in range(model.GetNumberOfSelectedProxies())]
sources = [
  servermanager._getPyProxy(p) 
  if p.IsA("vtkSMSourceProxy") else
  servermanager.OutputPort(servermanager._getPyProxy(p.GetSourceProxy()), p.GetPortIndex())
  for p in proxies
]

@mwestphal I mean when a user performs a typical multi-selection using CTRL or SHIFT modifiers in the Pipeline Browser.

But the code from @lhofmann gets me what I need. Thank you!
The ProxySelectionModel is exactly what I needed. GetSelectionModel is one of those attributes/methods that doesn’t popup when autocompleting or using dir()