Graphics

 View Only
  • 1.  [Question] Will the datalinq property ever become public?

    Posted 04-13-2018 06:03
    Would love to access and write datalinq values via script, was wondering if this property will ever become accessible? (specifically in studio)


  • 2.  RE: [Question] Will the datalinq property ever become public?

    Posted 04-16-2018 18:14
    The xpDatalinq property was added in version 5.9. The majority of Datalinq-able objects have an xpDatalinq public property that you can use to write strings to the Datalinq settings like columb/row/table/etc... Look for the xpDatalinq Object Members in the SDK.
    #XPression


  • 3.  RE: [Question] Will the datalinq property ever become public?

    Posted 04-20-2018 21:50

    Hey Garner,

    I saw that the xpDatalinq property exists, and I've tried writing to it but I keep getting hit with read only issues.

    For example, attached is a picture of the xpTextObject.Datalinq property which is read only

    nvm i'm an idiot, please ignore


    #XPression


  • 4.  RE: [Question] Will the datalinq property ever become public?

    Posted 04-27-2018 18:28
    To clarify for everyone else, the xpDatalinq property is read-only, but the public properties of the xpDatalinq property are read-write. So you can write a string to xpDatalinq.Column for example.
    #XPression


  • 5.  RE: [Question] Will the datalinq property ever become public?

    Posted 04-27-2018 19:48
    Hi Garner,
    It would be useful to be able to change the datalinq in a script. Without this ability one has to create a text object for every possible datalinq and switch between text objects.
    #XPression


  • 6.  RE: [Question] Will the datalinq property ever become public?

    Posted 04-28-2018 14:06
    All the members of xpDataLinq object that are read-write can be modified by script and the changes are taken into account but ... the Value member will not be updated at once ( you have to wait many frames to get the value updated ! )

    So changing datalinq members in a script to get more than one value will not work : Value won't be updated

    For example , "MyText" object is bound to a Excel Datalinq that contains a column with "Player 1" , "Player 2" , ...

    In the following script :
    dim txtObj as xpTextObject
    Dim str as string

    Scene.GetObjectByName("MyText",txtObj)

    str = "row " + txtObj.Datalinq.Row.ToString() + " : " + txtObj.Datalinq.Value 'get current row number and Value associated

    txtObj.Datalinq.Row = txtObj.Datalinq.Row + 1 ' Go to next Row

    str = str + vbNewLine + "row " + txtObj.Datalinq.Row.ToString() + " : " + txtObj.Datalinq.Value 'get again current row number and Value associated


    str will be :
    [FONT=courier new]row 1 : Player 1
    row 2 : Player 1[/FONT]

    "MyText" object will display "Player 2" in the next rendered frames.






    #XPression


  • 7.  RE: [Question] Will the datalinq property ever become public?

    Posted 04-29-2018 09:46
    Hi,

    I don't use too much datalinq with script, but maybe a scene.RefreshDatalinqs() could resolve your problem.
    #XPression


  • 8.  RE: [Question] Will the datalinq property ever become public?

    Posted 04-30-2018 01:14
    Amignon, you are right, it will take a few frames for XPression to request the data from the datalinq server and for the datalinq server to actually get the data. (Actual amount of time will alos depend on the data type and the speed, for example databases will take longer to query than just reading an XML file).

    The typical was to handle this, when you want one piece of data to affect a query to get something else, is to put part of the script in the OnSetText script of the object that is receiving the data. So after the datalinq has retrieved and sent the data back, then it updates a text object, and calls the OnSetText script of that text object; which can then go and request some other piece of data.

    #XPression