PDA

View Full Version : DB Link, Excel with popup


777twist
10-14-2005, 03:21 PM
We have switched over from Deko and we are looking for information on setting up a macro (or however the best way to do it is) using Chyron. We have a LEX with Lyric 5.21.

We use a list that has basically these columns NAME, TITLE. We have well over a 1000 names and need to be able to setup our lower3rd supers so we can just input the record number to populate the super.

I know how to setup the excel part (we use Access with Deko, but if Chyron works with Excel, that may be easier), I just need to know how to put in the variables and then make the macro to popup a requester box where our users will enter the number of the record they want to populate the lower3rd super.

Hope someone can help, it's not all that hard... I'm just not a programmer. I setup the one on the Deko from instructions from a guy who wrote a bunch of macros...so I can set it up if I have the info.

Francesco
HTV22

justakeystroke
10-19-2005, 01:38 PM
If you open up Lyric and click on Help>Help Topics from the top tools. Lyric's on-line help is very intuitive. The first screen explains what is new in Lyric software. Click the Index Tab on the left and type in DB in the input field. DB Link should appear. Double click the DB Link words and the selection box will appear. Click on DB Link from the selection and the help will talk you through it. This will work just fine with excel.

jzimmerlin
10-29-2005, 01:13 PM
Here's an article that guides you through the process of doing what you want to do. The original article is posted at http://www.jeffzimmerlin.com/Pages/FeatureArticle.php?Number=27 with pictures you may find helpful.

"Lyric's DB Link feature can be used to import data directly from specially formatted Microsoft Excel spreadsheets. Depending on your needs, you can configure Lyric to import data from a specific row in Microsoft Excel (thus, every time you call up a message, it imports data from the same row) OR you can setup a macro to prompt the user for a row number (thus, you can create a single message that can import data from any one of the rows in a Microsoft Excel spreadsheet). The following is a step-by-step guide to creating a Lyric message with a DB Link that prompts the user for the row number as the message is called up.

Setting up the DB Link in a Lyric Message
1. Create a new message and insert a template field.
2. Right click inside of the template field and select "Template Properties."

3. Click on the checkbox next to "DB Link."

4. Click on the "DB Link" button and select a data source, table, and field.

Configuring the Macro
1. Click on the View menu and select Macros.

2. Click on the "+" button in the bottom corner to create a new macro.

3. Enter the following Visual Basic code in the "Script" tab:

RowNum=InputBox("Enter Excel Row Number:", "www.jeffzimmerlin.com")
set pnode=ActiveCanvas.Scene.Node(5)
set pelm=pnode.Element(0)
set dbl=pelm.DBLink
dbl.RecordNumber=RowNum
set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys("%el")

4. The 5 in the second line of code corresponds to the layer number. For example, the 2D Text 3 layer has the template field with the DB Link. This layer is the fifth from the bottom (the bottom most layer is layer 0). Change the 5 to the number of the layer you need to update.

5. The 0 in the third line of code corresponds to the template number with the DB Link. Change the 0 to the number of the template field you need to update.

6. Click on the Save button. Select the macro you programmed from the "Auto Execute" drop-down menu. The message should be saved as a numbered .lyr file (i.e. 05252842.lyr) in your default messages directory.


Congratulations! You've successfully created a dynamic DB Link."

777twist
11-03-2005, 05:53 PM
I just saw this post, I will try this tomorrow (if I have time...I'm wicked busy) and let everyone know if it works (I'm sure it works...but I want to make sure it works like I think)

Again, thanks for the response.

Francesco