AnsweredAssumed Answered

Add layer group with multiple layers and persist in table of contents

Question asked by Euroconsult on Sep 22, 2020
I am programming a pyhton tool whose purpose is to add a group of layers with several layers to the current mxd.
I am migrating a pyhton script to a pyhton toolbox. When I run the script, the layers are added to the TOC and they persist,
but when I run the python tool, I see that the layers are added to the table of contents and when the tool ends correctly,
this group of layers and the layers it contains disappear.
I've been researching in the community and using a derived parameter and SetParameterAsText() funtion, the only thing
I get is that the layer group persists in the TOC, but not the layers that this group has.

Can somebody help me, please?