How to trigger the Aximmetry`s script

 

I wrote a script that writes data to a file and provides a pin that triggers the script, but when I set a value to that trigger pin , anything happend ,and does not cause the script to start running, that is why?

This is my script:

So,how can a script in Aximmetry be triggered?Is  the way I set  to trigger the script wrong?

   zjf0001

 
Profile Image
Eifert@Aximmetry
  -  

Hi,

You might not need a script at all, as there is a Text Exporter module that can write text files without using a script.

There are two problems with your script.
First, the Start pin in the Script is a Trigger data type, while the Set Logical Pin module can only change Logical data type pins.
Second, the Script is not connected to any active output. Aximmetry will only execute modules when it is connected to an active output. In this case, Aximmetry won't know that you made actual output in the script with io.write. You could do something like this:

--$ inWrite logical
--$ outLog text

if (inWrite)
    then
        outLog = "a"
    end

If you want to keep using Logical pin, then you can directly convert it for example by using a Copy Logical module. Note, the Set ... Pin modules are not really intended to be used like this, they are for changing pins on Control Boards.
Also, you can use a Force Execution module instead of connecting it to preview/video output.

You can read more about module execution here: https://aximmetry.com/learn/virtual-production-workflow/preparation-of-the-production-environment-phase-i/scripting-in-aximmetry/flow-editor/module/#module-execution

Warmest regards,