VTW Get Image Infos From GH

Here is an example of vbscript code to fetch image information from a folder on the Graphic Hub.

In Viz Engine Console : send IMAGE COMMAND_INFO
or web page : C:\Program Files\vizrt\Viz3\Documentation\CommandInterface\index.html

'Dim host : host = MainMachine 'can be an IP address
Dim host : host = "<replace with frame server IP address>" 'frame server
Dim command : command = "IMAGE GET_DETAIL " 'returns all items in the GH images folder
Dim path : path = "<replace with your folder path on the GH>" 'GH images folder path

Sub InitForm
        Dim getDetail : getDetail = SendSingleCmd(host, command & "/" & path, true)
        if getDetail<>"" then
                Set re = New RegExp
                With re
                .Pattern = "\/[a-zA-Z_\-]+\s" 's:space
                .IgnoreCase = False
                .Global = True
                End With
                Set results = re.Execute(getDetail)
                cb_team.Items.Clear()
                cb_team.text = ""
                imgLogo.PicFilename = ""
                imgLogo.ThumbFilename = ""
                ed_teamName.text = ""
                ed_teamLocation.text = ""
                For Each oMatch In results
                        cb_team.Items.Add(Replace(Replace(oMatch.Value,"/","")," ",""))
                Next
        end if
End Sub

Sub cb_teamChange(Sender)
        'checks if image actually exists in the folder
        Dim reply : reply = SendSingleCmd(host, "IMAGE EXIST " & "/" & path & Sender.text, true)
        if right(reply,1) = 1 then
                imgLogo.PicFilename = "IMAGE*" & path & Sender.text
                imgLogo.ThumbFilename = "IMAGE*" & path & Sender.text
        else
                msgbox("The picture does not exist !")
        end if
        Dim arr
        arr = split(Sender.text,"-")
        ed_teamName.text = Replace(arr(0),"_"," ")
        ed_teamLocation.text = Replace(arr(1),"_"," ")
End sub

User Interface:

Shopping Cart