Page 1 of 1

multiple site and divece id at the same time

PostPosted: Tue Aug 27, 2019 11:54 pm
by satanete666
Is possible to send from wd to multiple device and site id in only one line? , because if i send multiple lines the devices are not in sync

Re: multiple site and divece id at the same time

PostPosted: Wed Aug 28, 2019 6:36 pm
by Benni_M
What are you trying to send?

Re: multiple site and divece id at the same time

PostPosted: Wed Sep 04, 2019 11:46 pm
by satanete666
I would like to send mĂșltiple parameter at the dame time to one layer, like, xpos, ypos, xsize at the same time, not one by one send parameters

Re: multiple site and divece id at the same time

PostPosted: Thu Sep 05, 2019 1:24 am
by justyn roy
Can you share your code that you've done?

This is possible by putting all of your code in one Button/Macro/Function.

And you can set Variables to make it easier to use your code for different Layers.
For example.

Code: Select all
Var Site = 2
Var Layer = 1

Var XPos = 1.0
Var YPos = 1.0
Var Size = 0.5

Var FadeTimeSeconds = 2

DeviceFadeToParam(Site,Layer,"X Pos",XPos,FadeTimeSeconds)
DeviceFadeToParam(Site,Layer,"Y Pos",YPos,FadeTimeSeconds)
DeviceFadeToParam(Site,Layer,"X Scale",Size,FadeTimeSeconds)
DeviceFadeToParam(Site,Layer,"Y Scale",Size,FadeTimeSeconds)


This will move all of these attributes on Layer 1 over 2 seconds at the same time.


For fun, and to make sure it is all at the same time, I tried this on 4 layers using the same code (and a Loop command).
All 4 layers and their parameters moved at the same time.

You can try it if you'd like, put content on Layer 1 to 4 and try this script - it will move them in a step type configuration.
This also works if you change the fade time to 0 - everything snaps to the same place instantly.

Code: Select all
Var Site = 2
Var Layer = [1,2,3,4]

Var XPos = 1.0
Var YPos = 1.0
Var Size = 0.5

Var FadeTimeSeconds = 2

For i = 0 to Layer.Count - 1 {
   DeviceFadeToParam(Site,Layer[i],"X Pos",XPos*i,FadeTimeSeconds)
   DeviceFadeToParam(Site,Layer[i],"Y Pos",YPos*i,FadeTimeSeconds)
   DeviceFadeToParam(Site,Layer[i],"X Scale",Size,FadeTimeSeconds)
   DeviceFadeToParam(Site,Layer[i],"Y Scale",Size,FadeTimeSeconds)
}

Re: multiple site and divece id at the same time

PostPosted: Tue Sep 10, 2019 9:44 pm
by satanete666
Dear Justin,

yes it works , thank you a lot.