Dear developers,
using the ArcGIS Pro SDK, we have developped a tool that loads simulation results (stored in 2 Feature Classes) to the map, adding a whole tree of layers.
For explanation: We have one feature class with water levels and one feature class containing velocities. For each output timestep of the simulation, we have one column containing the values. In addition, there is one column for maximum values. The tool adds a new GroupLayer to the map. Then, FeatureLayers for max. waterlevel and velocity are added. For each output timestep a GroupLayer is added into the above GroupLayer. Then into this new GroupLayer, FeatureLayers with waterlevel and velocity of the current timestep are added.
We use LayerFactory.Instance.CreateLayer<GroupLayer> and LayerFactory.Instance.CreateLayer<FeatureLayer>
Using these methods, I always need a parent container. So I start with the map as the parent container.
In addition, the symbology of the FeatureLayers is adapted.
Doing so, each single action is shown in the Undo Stack.

But from the user's perspective, this should be only one single action / operation.
How can I encapsulate these actions into one single operation ?
If it was about making multiple edits to tables and Feature Classes, I would use an EditOperation. But it seems like this is only meant for edits of database entities.
I am looking forward for your suggestions.
Best regards,
Ulrich Egger