Hi Nick,
If you need to dynamically change the datasource of a text object in a scene I don't see that being possible at the moment. You can change all the datalinq properties of a published object of a take item including the datasource. (I am using Xpression 10.5)
'Change datalinq properties of a published object
dim takeItem as xpTakeItem
dim template as xpPublishedObject
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)
Another thing I do is use a scene to pull data from a datalinq source and put the value into the static text of a published object. You cannot change the datasource, but you could have multiple text objects each assigned to a different datasource.
Here is how I setup the text object I named excel in the scene:

You can then update the text objects and refresh the datalinq to get an updated value.
'Get Datalinq Scene
dim dlScene as xpScene
dim column, row, table, excel as xpTextObject
dim takeItem as xpTakeItem
dim template as xpPublishedObject
engine.GetSceneByName("Get Datalinq", dlScene)
dlScene.GetObjectByName("Column", column)
dlScene.GetObjectByName("Row", row)
dlScene.GetObjectByName("Table", table)
dlScene.GetOBjectByName("excel", excel)
column.Text = "COLUMN NAME"
row.Text = 88
table.Text = "TABLE NAME"
dlScene.RefreshDatalinqsAndWait()
engine.Sequencer.GetFocusedTakeItem(takeItem)
takeItem.GetPublishedObjectByName("PUBLISHED OBJECT NAME", template)
template.SetPropertyString(0, excel.Text)
------------------------------
Doug Clift
Lead Developer
AT&T SportsNet
------------------------------
Original Message:
Sent: 04-21-2022 22:31
From: Nick Huntley
Subject: Dynamically create text with Datalinq source
In theory running this onKeyPress should give me the ability to take any scene object and set it to "datalinq" per the PropertySourceType enumeration:
dim scene as xpScene
Dim Obj as xpTextObject
engine.GetFocusedScene(scene)
scene.GetFocusedObject(obj)
Scene.SetObjectPropertyString(obj.Name,"PropertySourceType",1)
But this does nothing at the moment (propertysourcetype seems to be a sequencer-side enumeration from what I can decipher even though the controls exist on unpublished objects just as much as they do on published ones)
------------------------------
Nick Huntley
Original Message:
Sent: 04-21-2022 22:22
From: Nick Huntley
Subject: Dynamically create text with Datalinq source
Sure, but that doesn't change the switch from "Static Text" to "Datalinq" at the "Select Data Source" level which is the roadblock I keep running into with this specific use case. I want to be able to create a text object, then set it to "datalinq" via API, at the moment it is stuck in "static text" when created. I CAN assign it a datalinq value but it doesn't appear to behave correctly (it seems to take the first value when first assigned but will not update past that value until it is told it is a "datalinq source" text object
------------------------------
Nick Huntley
Original Message:
Sent: 04-21-2022 13:34
From: Simon Redmile
Subject: Dynamically create text with Datalinq source
I guess so, if you look in the SDK you'll find things like datalinq.LinkName and datalinq.Colomn
Here's an example of a loop I am using at the moment. Row doesn't have to be there if you don't want to set something but I put it there to blank out any bogus data that had been added.
for i = 1 to 9
dim stat as xpTextObject
self.GetObjectByName("DATA RAW Jersey " & i, stat)
stat.Datalinq.LinkName="PARAM_DASH"
stat.Datalinq.Column="@Team.Dash@\Lineup\element<" & i & ">"
stat.Datalinq.Row=""
next
------------------------------
Simon Redmile
Senior Graphic Programmer & Designer
Ross Video
Bristol United Kingdom
Original Message:
Sent: 04-21-2022 13:25
From: Nick Huntley
Subject: Dynamically create text with Datalinq source
Has this changed in the last 7 years? I'm hoping to make a lot of our graphics more flexible by creating and destroying objects dynamically rather than having hundreds of invisible objects ready to handle data sources but would need to be able to create objects via the SDK that can then be datalinqed via the SDK. Thanks!
------------------------------
Nick Huntley
Original Message:
Sent: 04-17-2015 04:00
From: Archive User
Subject: Dynamically create text with Datalinq source
Thanks Brian,
I was afraid of that.
#XPression