Saving a file to disk via daz script

Hi,

Looking for a way to save a file to disk via daz scripting api, basically I want to write json data to disk, so I can run simulations externally. Is this possible via the scripting api?

Post edited by Richard Haseltine on

Comments

  • edited April 2018
    var file = new DzFile( [directory_path, 'data', 'myjson.json'].join('/') );file.open( DzFile.WriteOnly );file.write(JSON.stringify({one: 'two'}));file.close();

    Nm figured it out ^

     

    Post edited by jasonayre_e56515d280 on
  • Anyone happen to know if there is a way to access the cms database via dazscript?
  • Richard HaseltineRichard Haseltine Posts: 100,920

    Moved to the scripting forum, rather than the SDK forum.

    DzContentMgr gives you access to the database.

  • Richard HaseltineRichard Haseltine Posts: 100,920

    Sorry, that should have been DzAssetMgr, along with DzProductAssetContainer and DzAsset

Sign In or Register to comment.