Graphics

 View Only
  • 1.  Script only works on datalinq text

    Posted 05-16-2018 21:23

    I use the below script to edit a datalinq text field that is pulling user names from facebook. So John Doe becomes John D. This script works perfectly but for some reason if I make the text field static, the script stops working and I'm not sure why. Anybody have any advice... Thank you.


    dim first as string
    dim last as string
    first = Split(Text," ",2)(0)
    'grabs first name
    last = Split(Text," ",2)(1)
    'grabs last name
    last = Left(last,1) & "."
    'trims last name to just the first letter and adds a period
    text = first & " " & last
    'outputs the first name and the trimmed last name


  • 2.  RE: Script only works on datalinq text

    Posted 05-17-2018 18:39
    I pasted that script onto a scene with only a single static text object, and played the scene through the sequencer and it worked fine.
    I suspect something more complicated in your scene is preventing it from working. Try what I did and let me know your results.
    #XPression


  • 3.  RE: Script only works on datalinq text

    Posted 05-17-2018 20:39
    Thanks Brian. I did just that and you're right it worked on the sequencer side. It didn't occur to me to send it to the sequencer. I usually generate the scripts on the layout and double-click the scene to send it to program to see if script is working. Weird though that on the layout side, the script only seems to work if the text field is datalinqed. But sending to the sequencer the script worked perfectly on the static text.

    Thank you for your help.
    #XPression


  • 4.  RE: Script only works on datalinq text

    Posted 05-18-2018 12:32
    Putting a scene online through layout does not call OnSetText scripts. They only get called when new text is assigned to the object (which happens when datalinq changes the value, or when the sequencer assigned the published template data into the scene).

    #XPression