Graphics

 View Only
  • 1.  Script that can extract content from a text file

    Posted 10-01-2014 09:35
    Hi folks,

    I am looking for a script, that can extract content from a .txt file and display that in a text object. I cannot get the script to read the file.

    Can any of you clever folks help me?

    Best

    Niels


  • 2.  RE: Script that can extract content from a text file

    Posted 10-01-2014 09:40
    Hi NIels,

    I don't think it can be done from within the Scripting tool inside XPression because you would need some sort of external library to doe the file handling such as the File System Object, which is, as far as I know, not included in XPression.

    Having said that there is ofcourse a solution using the API but also using the DataLinq it should be possible.

    Best regards,

    Kenneth

    #XPression


  • 3.  RE: Script that can extract content from a text file

    Posted 10-01-2014 09:43
    Hi Kenneth,

    Under normal circumstances I would have used Datalinq, but in this particular case that is not an option. Thus I need to find a way through scripting.

    As you flag the issue calling the external libraries.

    Thanks

    Niels

    #XPression


  • 4.  RE: Script that can extract content from a text file

    Posted 10-01-2014 13:35
    Hi Niels,

    Anything like File IO done inside scripting will probably lead to stutters and glitching on the output. The scripts are run in realtime by the render pipeline so anything like File IO that might stall their execution will probably lead to issues.

    #XPression


  • 5.  RE: Script that can extract content from a text file

    Posted 10-01-2014 13:40
    Hi Brian,

    In this particular case I am not too concerned about the risk of stuttering, as it is a quite simple setup.

    Best

    Niels

    #XPression


  • 6.  RE: Script that can extract content from a text file

    Posted 10-01-2014 13:40
    Hi Brian,

    In this particular case I am not too concerned about the risk of stuttering, as it is a quite simple setup.

    Best

    Niels

    #XPression


  • 7.  RE: Script that can extract content from a text file

    Posted 10-01-2014 21:51
    Niels,

    I think it would be somewhere in here:

    Visual Basic - File Access

    Sorry I can't be of more help..

    EDIT: Although it sounds like you have already tired this and are having trouble with it...

    #XPression