Pages

Sunday, January 24

Chyron DB Link Macro


At work, I use a Chyron Duet system to operate live graphics for TV shows. Recently we needed to create nearly 200 full screen (F/S) graphic pages for an awards ceremony. We had all the information in an Excel spreadsheet, and setup a F/S with template fields. We linked the template fields to fields in the Excel document, but we couldn't figure how to automate the process of linking all the rows.

I was browsing the Chyron forums for the longest time and ran across a macro that when activated, calls up as box where the user enters the excel row, and the template field will look at that row. Enter the following in the script tab:

RowNum=InputBox("Enter Excel Row Number:")
set pnode=ActiveCanvas.Scene.Node(Q)
set pelm=pnode.Element(W)
set dbl=pelm.DBLink
dbl.RecordNumber=RowNum
set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys("%el")

The "Q" in the second line of code corresponds to the layer number in the message page. The bottom most layer is layer 0. In the following example, the text layer where my templates are in is the third from the bottom, so I would put the number 3 in place of the Q.

ex.
[ ] 2D Text 4 Layer
[ ] Global Light
[ ] Camera

The "W" in the third line of code corresponds to the template field number with the DB Link (you can check the DB Link in the template properties window to see what number is assigned to the template field). Change the W to the number of the field you need to update.

jzimmerlin (on chyron forums) suggests that you select the macro you've created from the "Auto Execute" drop-down menu (not sure what that means) and save this macro as a numbered .lyr file (ex. 02351241.lyr) in your default messages directory.

Me, I made a folder called macros in the directory and I assigned a hot-key combo to it. This way, when I use the hot-key, the window pops up and I use it similarly to calling up messages... just... within a message... When I call up the profile, I use "File > Open" to open the macros folder. Remember, I'm a newb, so do what you feel is best and play around with it.

Here is a video from Chyron explaining how to create DB Links.


(2005 macro credit: www.jeffzimmerlin.com)
Find the original post Here

0 comments: