Copy Stack?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Copy Stack?
Is there a way to copy a substack from one main stack to another main stack? If there is a way I would much prefer that to building the whole thing over again,
Thanks,
Larry
Thanks,
Larry
Re: Copy Stack?
Hi Larry,
not directly, but possible
Do something like this:
...
## Make a copy of the stack
## CLONE will automatically make a substack a mainstack and add "Copy of " to the name
## The substack does not need to be open!
clone stack "Name of substack" of stack "Mainstack"
## Set its mainstack
set the mainstack of stack "Copy of Name of substack" to "New mainstack"
## Now rename that stack if neccessary
set the name of stack "Copy of Name of substack" of "New mainstack" to "Name of substack"
## If neccessary:
close stack "Name of substack"
...
Tested and works
Best
Klaus
not directly, but possible

Do something like this:
...
## Make a copy of the stack
## CLONE will automatically make a substack a mainstack and add "Copy of " to the name
## The substack does not need to be open!
clone stack "Name of substack" of stack "Mainstack"
## Set its mainstack
set the mainstack of stack "Copy of Name of substack" to "New mainstack"
## Now rename that stack if neccessary
set the name of stack "Copy of Name of substack" of "New mainstack" to "Name of substack"
## If neccessary:
close stack "Name of substack"
...
Tested and works

Best
Klaus
Re: Copy Stack?
Thanks Klaus,
I'll give it a try.
Larry
I'll give it a try.
Larry
Re: Copy Stack?
Just tested and works! 

Re: Copy Stack?
Klaus,
Worked like a champ.
I did have to change:
set the name of stack "Copy of Name of substack" of "New mainstack" to "Name of substack"
to:
set the name of stack "Copy of Name of substack" of stack "New mainstack" to "Name of substack"
Thanks again for such a quick reply.
Larry
Worked like a champ.
I did have to change:
set the name of stack "Copy of Name of substack" of "New mainstack" to "Name of substack"
to:
set the name of stack "Copy of Name of substack" of stack "New mainstack" to "Name of substack"
Thanks again for such a quick reply.
Larry
Re: Copy Stack?
Ah, yes, sorry, "made in a hurry" 
