question

Martin K5 avatar image
0 Likes"
Martin K5 asked Jeanette F commented

Video recording trigger

Hi,

is it possible to set up a trigger on "On Model Open" which will start the (predefined) Video Recording?

Thank you,

Martin

FlexSim 23.2.3
triggersvideo recordertriggermodel open
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Martin K5, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered

You can inspect the structure of the Video Recorder GUI to see that the 'Record' button has something similar to this:

Object vr=Model.find("Tools/VideoRecorder");
treenode outputs = node(">variables/outputs", vr);
clearcontents(getvarnode(vr, "active"));
treenode stopTimes = assertvariable(vr, "stopTimes");
stopTimes.value = nullvar;
for(int r = 1; r <= content(outputs); r++){
        treenode currOutput = rank(outputs, r);
        int active = getnodenum(node("active", currOutput));    
        if(active == 0){  //If this output's not active, we don't care about it.        
            continue;
        }
        // nodepoint(getvarnode(vr, "jobscallback"), node("onStopRecord", eventfunctions(ownerview(c))));   //
        function_s(vr, "GenRecording", VREC_RECMODE_ONE, currOutput);            
}    
sendmessage(vr, vr, VREC_MSG_JOBS_RUN);


You may/not need to set the callback to some dummy node - the line I commented out for now.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.