This function allows you to test whether a particular Stock-Section would have a non-empty output if it were executed in the current generator context with the specified context element passed to it along with the specified Stock-Section parameters.
Note: When the Stock-Section is called by this function,
the generator output status property
(see GOMOutputInfo.status
) will be "checking"
within both the Stock-Section itself and any template components called from it
(including any subtemplates).
This will be independent of what the main (context) generation phase currently is.
In many cases, a call of the CheckStockSectionOutput()
function
will return the same result as the following expression:
callStockSection(..) != ""
In addition, checkStockSectionOutput()
will work much faster
than callStockSection()
, since no actual output is generated.
You may find it helpful to use the checkStockSectionOutput()
function
within Enabling Conditions of some template components to program switching
them on/off depending on whether certain pieces of output may or will be produced
by this template in somewhere else.
Parameters:
element
'stockSection.contextElement'
generator variable).
If this parameter is not specified, the current generator context element
will be used by default (see GOMContext.contextElement
).
When the parameter is specified and its value is null
,
the function returns false
.
stockSectionName
param
params
The Stock-Section parameters can be accessed within the Stock-Section
using the 'stockSection.params'
generator variable.
diagram.checkStockSectionOutput (
"Diagram Doc",
Array("Use-Case Diagram", true)
);
callStockSection(), Array(), 'stockSection'
generator variable.