Copy properties of a source to another source programmatically depending on user input

I want to copy the properties of some sources x1, x2,…,x5 to other sources y1,y2,…,y5 programmatically depending on user input.

The user chooses X, so instead of copying by hand the properties of x1 to y1, x2 to y2, etc. I want to do a macro or something that lets me do this automatically. But I can’t pass arguments to macros, right?

Is there a way to do this?

Not sure to follow. When you say 'User Choose X", do you mean in the interface or in python ?

I’m sorry. For example, the person using Paraview, depending on what he sees in the view, has to choose b or c.

If he chose b, then he has to paste b_InitialPosition to a_InitialPosition and b_TranslateToOriginAndScale to a_TranslateToOriginAndScale.

If he chose c, then he has to paste c_InitialPosition to a_InitialPosition and c_TranslateToOriginAndScale to a_TranslateToOriginAndScale.

Screen Shot 2020-01-23 at 19.33.24

I want to do something that, with a couple of clicks, copy the properties of b or c and paste them into a. I thought of a macro, but how can I tell the maco which option the user chooses?

How I did it:

First, I realized that every case was different. Every filter has its own properties.

For example, copying the properties of un transform to another transform.

transform1 = Transform(Input=transform)
sphere = FindSource("Sphere")

# Copy the properties of the trajectory selected to 
transform1.Transform.Translate = sphere.Transform.Translate
transform1.Transform.Scale = sphere.Transform.Scale
transform1.Transform.Rotate = sphere.Transform.Rotate

or from a slice to another slice

slice1 = FindSource("Slice1")
slice2 = Slice(Input=transform2)

slice2.SliceType.Origin = slice1.SliceType.Origin
slice2.SliceType.Normal = slice1.SliceType.Normal

If your filter are the same, you can simply use the copy paste mechanism.
(only in the GUI, not in python)

If not, as you realized, it would requires specific n-n mapping.