View Only
  • 1.  Assign Datalinq material with script

    Posted 17 days ago

    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
    takeItem.GetPublishedObjectByName("PUBLISHED OBJECT NAME", template)
      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

  • 2.  RE: Assign Datalinq material with script

    Posted 14 days ago

    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

  • 3.  RE: Assign Datalinq material with script

    Posted 8 days ago

    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


  • 4.  RE: Assign Datalinq material with script

    Ross Staff
    Posted 8 days ago

    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.Row="@Team.Dak_XML@_LINEUP_0" & i &"_NUMBER"

       stat.Datalinq.RefreshLinqsOnChange = false


    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom

  • 5.  RE: Assign Datalinq material with script

    Posted 6 days ago

    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.

    Bernhard Aschenwald
    Servus TV
    Red Bull Media House