Rik's Treehouse
>
Babbling in Binary
>
My Software
>
Orphanware
>
R2DToo
>
R2DToo Help
>
Automation
> StopIfAdd
StopIfAdd
Declaration
Parameters
Return Value
Remarks
Example
See Also
Declaration
object.StopIfAdd(condition)
Parameters
object
Required. Always the name of a
R2DToo.FrontEnd
object.
condition
Character string with the following format:
"parameter relation value"
where
parameter
is the name (excluding trailing
[...]
properties) of a model parameter, or
"Tick"
for simulation time. (Case sensitive.)
relation
is one of
>=
,
=
, or
<=
.
value
is a number.
Return Value
Returns 1 on success, 0 on fail (eg. if
parameter
or
relation
not recognized, or if
value
is not a number).
Remarks
Sets a conditional stop for the simulation. When
condition
is met, the simulation will automatically pause. Intended to be used with
SimRunWait
.
Example
' [VBScript] ' load Dim R2DToo Set R2DToo = Wscript.CreateObject("R2DToo.FrontEnd") ' set stop condition R2DToo.StopIfAdd("Tick >= 1000") ' run and wait... R2DToo.SimRunWait() WScript.Echo "Simulation paused!" ' unload Set R2DToo = nothing
See Also
SimRunWait
,
StopIfRemoveAll
.
[Rik's Office Hours]
[Contact Rik]
Last updated: Fri Apr 30 2004, 1:48pm