I have done this as well. But I have not found a way to assign datalinq to quad objects. I can change the datalinq keys with a script but I can't assign it for a static quad.
Original Message:
Sent: 02-21-2024 08:32
From: Simon Redmile
Subject: Assign Datalinq material with script
I place a loop script on a scene director to avoid having to assign it manually every time.
Not exactly what you asked for but this is how I do it.
'Set Datalinqs
for i as integer = 1 to 9
Dim stat as xpTextObject
scene.GetObjectByName("DATA RAW Jersey " & i, stat)
stat.Datalinq.LinkName="Dak_XML_Scoreboard"
stat.Datalinq.Column="Table\Row"
stat.Datalinq.Row="@Team.Dak_XML@_LINEUP_0" & i &"_NUMBER"
stat.Datalinq.RefreshLinqsOnChange = false
Next
------------------------------
Simon Redmile
Senior Graphic Programmer & Designer
Ross Video
Bristol United Kingdom
Original Message:
Sent: 02-21-2024 03:46
From: Bernhard Aschenwald
Subject: Assign Datalinq material with script
Thanks for your reply.
This is how I solved it finally (if someone is stumbling over this thread, with the same problem)
I changed all my quads to datalinq manually since it does not seem to work by scripting like for textobjects.
(Feature-request: change Data Source on multiple selected objects)
Then I assigned all datalinq keys with a script in the scene director. So I didn't have to assign 100+ objects manually and can easily make changes if the incoming data structure changes. The scene director with the script is run manually in Layout mode once. So I can even make all the values static in Sequence if needed.
Best regards
------------------------------
BernhardAschenwald
Austria
Original Message:
Sent: 02-14-2024 17:19
From: Malcolm Thorpe
Subject: Assign Datalinq material with script
The easiest way to do this would be using "dynamic materials". There are a few things you would have to do first, but basically you would link a hidden text field to the material you wanted, and use that to set the material. Let me know if you want to go down that road.
------------------------------
Malcolm Thorpe
xpression design
Free Lance Xpression Designer/Carbonite TD
Original Message:
Sent: 02-12-2024 09:09
From: Bernhard Aschenwald
Subject: Assign Datalinq material with script
I need to assign datalinq to published objects. It works fine so far for text objects with the following script:
dim takeItem as xpTakeItem
dim template as xpPublishedObject
dim dl as xpDatalinq
engine.Sequencer.GetFocusedTakeItem(takeItem)
takeItem.GetPublishedObjectByName("PUBLISHED OBJECT NAME", template)
template.GetDatalinq(0,dl)
dl.LinkName = "NAME OF DATASOURCE"
dl.Column = "COLUMN NAME"
dl.Row = 88
dl.Table = "TABLE NAME" & "$"
template.SetPropertySourceType(0, 1)
But this does not work when assigned to a quad for changing the material.
I works when I enter the Datalinq manually but the script does not assign to the object.
Any ideas what I am doing wrong?
------------------------------
Bernhard Aschenwald
------------------------------