Results 1 to 7 of 7

Thread: Beyond - PangoScripting - Variable="Zone 1" , "Zone 2" , "etc."

  1. #1
    Join Date
    Apr 2020
    Posts
    5

    Lightbulb Beyond - PangoScripting - Variable="Zone 1" , "Zone 2" , "etc."

    Im just curious if anyone has tried to do this and had any success. What Im trying to do is have a script that sets a globalvariable to a string that calls out projector zones by name "Zone 1". Right now, the code Im working with is:
    Globalvar UpperZones
    UpperZones="SR 1" , "SR 2" (Ideally this would be a longer list of zones, just using 2 for testing)


    However, this only makes UppserZones="SR 1" - Ive tried several ways with [] and {} and adding " " and ' ' as well.
    if you do UpperZones="SR 1"+ "SR 2" it doesnt keep the quotations and = "SR 1SR 2"

    Im basically trying to have a script that can create groups for my zones that i then reference for effects and other live controls. It would also allow for easy adaptation of new zones/zone names/shows since i could just use the grouping scripts/variables instead of hard numbers.

    Let me know if any of you have an idea.
    Thank you!

  2. #2
    Join Date
    Feb 2013
    Location
    Dallas, TX
    Posts
    439

    Default

    Quote Originally Posted by PhotonJohn View Post
    Im just curious if anyone has tried to do this and had any success. What Im trying to do is have a script that sets a globalvariable to a string that calls out projector zones by name "Zone 1". Right now, the code Im working with is:
    Globalvar UpperZones
    UpperZones="SR 1" , "SR 2" (Ideally this would be a longer list of zones, just using 2 for testing)


    However, this only makes UppserZones="SR 1" - Ive tried several ways with [] and {} and adding " " and ' ' as well.
    if you do UpperZones="SR 1"+ "SR 2" it doesnt keep the quotations and = "SR 1SR 2"

    Im basically trying to have a script that can create groups for my zones that i then reference for effects and other live controls. It would also allow for easy adaptation of new zones/zone names/shows since i could just use the grouping scripts/variables instead of hard numbers.

    Let me know if any of you have an idea.
    Thank you!
    I do this. I have a setvars pangoscript that declares a bunch of globalvars including easy zone names. I use the easy zone names in my universe's objects and the mapping to actual zones happens in the setvars script.

    you can control what's happening at the zone level a couple of ways:

    in setvars:
    globalvar C1; C1="Main Graphics"
    globalvar L1; L1="Left1"
    globalvar R1; R1="Right1"
    etc...

    Then in a universe button you could do:

    controlzone c1; SetFX 1,1
    controlzone L1; SetFX 2,5
    controlzone L2; AngleDelta 0,180,0
    etc

    Or sometimes if I want a bunch of zones to do the same thing I'll do this:

    //capture current zone selections first
    StoreZoneSelection
    Unselectallzones
    SelectZone C1, L1, L2
    ControlSelZones
    //whatever you want them to do
    SetFX 2,10
    //recover to previous zone selection
    RestoreZoneSelection

    If you wrap them in if statements, you can trigger the code to turn on/off effects based on the toggle status of the universe button to which this code belongs.

    Now that you know how, let me ask you why. You see, I went down this road initially when Beyond was in beta and still had a couple of bugs that prevented me from doing what I wanted from the APC40, but now that it's mature and includes many feature enhancements, my universe has been steadily shrinking, and live FX seem to work great at the cue or master level.

    How I use zones now is to map several versions of zones, such as L1a, L1b, L1c (all from the same Left 1 projector) but then I can turn on zone effects such that whenever a cue is sent to a different version of a zone, it appears differently. maybe the zone has a movement effect on it, maybe it's rotated for a mirror effect. maybe it's muted?

    Anyway, hope this helps.

  3. #3
    Join Date
    Feb 2013
    Location
    Dallas, TX
    Posts
    439

    Default

    Oh, I never answered your original question:

    Try

    //variable init
    var UpperZones, SR1, SR2
    UpperZones ="";SR1="Main Graphics";SR2="Atmospheric Beams";

    //build the str and store in UpperZones
    UpperZones = UpperZones + SR1+CRLF + SR2+CRLF

    if you then displaypopup SR1, SR2 you'll get foo and bar on different lines as different elements of the "array" and you can use this variable to drive zone selections too.

    good luck!

  4. #4
    Join Date
    Apr 2020
    Posts
    5

    Default

    Quote Originally Posted by hitekvoop View Post
    Oh, I never answered your original question:

    Try

    //variable init
    var UpperZones, SR1, SR2
    UpperZones ="";SR1="Main Graphics";SR2="Atmospheric Beams";

    //build the str and store in UpperZones
    UpperZones = UpperZones + SR1+CRLF + SR2+CRLF

    if you then displaypopup SR1, SR2 you'll get foo and bar on different lines as different elements of the "array" and you can use this variable to drive zone selections too.

    good luck!


    So I tried this and while I thought it would be a brilliant solution, it still did not achieve my goal.
    With that code I get Upperzones="Main GraphicsAtmosphericBeams" which doesnt actually do anything.
    What Im trying to get is "Main Graphics" , "Atmospheric Beams"

    However, it seems no matter what I try Beyond wants to put the whole phrase in quotes and doesnt allow quotes within quotes - or even number strings......

    Or can you do number strings?

    What Im trying to create it an easy way to refer to groups of zones - and have a single script that I can edit if i need to change groupings/etc. rather than rewrite controls or effects in my beyond universe or midi or whatever.


    Thanks so much for your replies! I really appreciate any ideas!

  5. #5
    Join Date
    Apr 2020
    Posts
    5

    Default

    Also i wanted to ask : What is 'CRLF' ? It didn't seem to register as anything - I tried using a variable="," but that still concatenated with the initial quotation to create one giant quoted variable.

    Is there a way to store selected zones by name?

  6. #6
    Join Date
    Feb 2013
    Location
    Dallas, TX
    Posts
    439

    Default

    CRLF will add a carriage return/linefeed to the value. It was the missing link in one of my earlier efforts, but now that I run the code I get the output I'm expecting from the variable, but if I feed the variable to the selectzones command it doesn't work. Let me play with it and see if I can make it work.

  7. #7
    Join Date
    Apr 2020
    Posts
    5

    Default

    I'd appreciate it! Ive been working at it for several days and cant seem to find a solution.

    I did also receive a reply from Pangolin Support that said this isnt entirely possible and that I should just use selzone and controlzone .....but not of this accomplishes that I want one variable for several items.

    I just dont think you can have a string within a string

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •