User Tools

Site Tools


odtools:od_storefilewithobject

OD Store File In Object is a command sequence plugin that takes a filename and chunk ID as parameters. It can either be called with command parameters (see below) or without, in which case the UI will pop up, asking for filename and chunk ID.

In python, invoking the command is at follows:

lwsdk.command('cmdseq “OD_StoreFileWithObject” \“'+ <file on disk> + ', ” + ID + “\”')

this example, will store the file c:\test.txt into a chunk id ^:

  1. filename = r“c:\test.txt”
  2. ID = “^”
  3. lwsdk.command('cmdseq “OD_StoreFileWithObject” \“'+ filename + ', ” + ID + “\”')

The file can at any point in time be restored via OD_RestoreFileFromObject. One use for the mechanism, is to store copyright trackers (like your name, date, etc) in your object.

The File currently has a size limit of 1 MB. You are allowed to store multiple files (1 per Chunk ID)

odtools/od_storefilewithobject.txt · Last modified: 2019/01/21 22:06 by oliver