2. Getting the Venue Information (Optional)

The server maintains a list of the channels used, their type, color and position relative to the venue map. Only complete this step if you want to use this information in your controller.
C#
WebClient web = new WebClient();
web.DownloadFile(new Uri("http://<server>:1235/venue.thor"),Directory.GetCurrentDirectory() + @"\temp.thor",null);
ServerVenues venues = new ServerVenues();
Rig rig = venues.LoadFromFile(Directory.GetCurrentDirectory() + @"\temp.thor");
Other Languages
The venue information is hosted at http://<server>:1235/venue.thor. This is actually a standard ZIP file which contains a JSON text file called "rig.json" and a jpg image called "venue.jpg". Each lamp is represented by an entry in the Lights array. Positions are 0-1 relative positions to the venue image.
JSON
{
    "Name":TestVenue, 
    "Lights":
    [
         {
            "Channel":1, 
            "Position":
            {
                "X":0.232558146, 
                "Y":0.33155793
            }, 
            "LampType":0, 
            "LampTypeName":"Generic", 
            "Color":"#1E90FF", 
            "Description":null, 
            "Hidden":false, 
            "UsedChannels":1
        }, 
        {
            "Channel":16, 
            "Position":
            {
                "X":0.7739535, 
                "Y":0.3355526
            }, 
            "LampType":0, 
            "LampTypeName":null, 
            "Color":"#1E90FF", 
            "Description":null, 
            "Hidden":false, 
            "UsedChannels":1
        }, 
     ]
}

Last edited May 8, 2013 at 10:08 PM by tombartindale, version 2

Comments

No comments yet.