Repeating set of actions within a macro


Moderators Note:
This post was moved from Help with macro for repeating action variables , and should have appeared at the top of this topic. But it did not for some reason.

So logically this post should appear at the top of this topic.

@macsearcher, in the future please do not double-post your questions. Starting a new topic, which you did, is all you need to do.


Hi Peter.
I've had some time to work with this and I've got it working pretty well.
I'm using a lot of your suggestions but still using a lot of my bulky script and I'd like to refine it a lot further but I'm learning a lot in the process.
There is another issue that I'm trying to get my head around.
Essentially, I am hoping to create a sub-macro within my macro that I can call as many times as I like. There are 10 or so actions that are common to every sub section of the script and every time that I want to change one variable, I have to copy and paste those 10 actions to each sub-section.
Can I simply put them in a container and say
run sub-macro A and continue?
I've attached the new script as it stands if you are curious.
I have described it in detail in a new post on the forum.
Thanks again for all of your help.populate layout edit e.kmmacros (770.9 KB)