Questions about running custom Lua script for forwarding instance

Hello,

I am trying to create a script to forward an instance to another PACS when it comes to Orthanc.

I created a autoforward.lua script and put it /usr/share/orthcanc/Lua/ folder.

function OnStoredInstance(instanceId, tags, metadata, origin)
print(‘onStoredInstance function has been called’)
Delete(SendToModality(instanceId, ‘Forward’))
end

I put this path in orthanc.json

“LuaScripts” : [
“/usr/share/orthanc/Lua/”
],

E1112 14:38:37.802919 OrthancException.h:76] The specified path does not point to a regular file: The path does not point to a regular file: /usr/share/orthanc/Lua/

your path is pointing to a folder, not a file.

Thank you! It worked!

2020-11-12, kt, 17:14 Alain Mazy <am@osimis.io> rašė: