vssBlockTerminateFlag
Flag used in custom blocks and called only once at the end of a simulation if the block requires final tasks to be performed, such as clearing variables, exporting, or organizing information once the block execution has finished.
Syntax
flagout = vssBlockTerminateFlag
Outputs
- flagout
 - Output of flag.
 
Example
Flag used in an OML Custom Block to write a CSV file upon the simulation termination with data from a base variable.
function OmlBlockFunction(block,flag)
	...
    if flag == vssBlockInitializeFlag
	   ...
    elseif flag == vssBlockReinitializeFlag
	   ...
    elseif flag == vssBlockTerminateFlag
	   q = GetFromBase('q', 0);
	   csvwrite('myoutput.csv',q);
    elseif flag == vssBlockOutputUpdateFlag
	   ...
    end
end