Page 1 of 1

Sync Channels

Posted: Sun Jan 15, 2017 12:21 pm
by dkwroot
Is there a way to sync channels in a reference layer using code? I can't seem to find the function.

Re: Sync Channels

Posted: Sun Jan 15, 2017 3:17 pm
by hayasidist
first of all a health warning -- I've never used this function, so I can't tell you what needs to be done before / after!

but hopefully this will set you on the way : MohoLayer:UpdateReferencedLayer(syncOptions) -- see: http://mohoscripting.com/index.php?show ... er&id=1117

Re: Sync Channels

Posted: Mon Jan 16, 2017 7:43 am
by dkwroot
This doesn't say anything about updating the channels though. I'm trying to find a way to sync the channels with the reference source.

Re: Sync Channels

Posted: Mon Jan 16, 2017 5:01 pm
by synthsin75
That should sync all channels for that layer. Are you needing to selectively sync channels?

Re: Sync Channels

Posted: Tue Jan 17, 2017 6:58 am
by dkwroot
Yeah, I was planning to create a script that would iterate through all layers and sync certain channels to their source.

Re: Sync Channels

Posted: Tue Jan 17, 2017 7:37 am
by synthsin75
Sorry, I'm not seeing any access to resyncing individual channels by script. And UpdateReferencedLayer doesn't do the channels either.

Re: Sync Channels

Posted: Tue Jan 17, 2017 9:52 am
by dkwroot
Okay, I'll go ahead and make a ticket regarding this. There definitely needs to be a better way for managing reference layers.

Re: Sync Channels

Posted: Tue Jan 17, 2017 10:30 am
by GaryC
I actually already created a ticket for this problem:

https://mantis.smithmicro.com/view.php?id=39002

It was targeted for the 12.2 release but doesn't seem to have been included.