OpenSTAAD V8i

2.5 Function Return Value

Most OpenSTAAD functions return a value to either:

If a function returns a Boolean result and that return value for an OpenSTAAD function is equal to 0 (zero), it means that OpenSTAAD was unable to execute the function.  If you see this result, check that you have passed all the required parameters to the function. Make sure that all parameters being passed are valid. A return value of 1 (one) indicates that OpenSTAAD successfully executed the function.

VB Example

objOpenSTAAD.BooleanReturn param1, param2, … ,paramn
'or, if you would like to capture the Boolean result for flagging:
                
functionFlag = objOpenSTAAD.BooleanReturn param1, param2, … ,paramn
            

Unless specified otherwise, results returned by a function are stored in variable names passed to it for the purpose. 

A few of the OpenSTAAD Application functions return the results as the return value of the function. In those cases, the above comments regarding the function return value do not apply.

If a function returns the value of the function,

Dim returnValue
returnValue = objOpenSTAAD.BooleanReturn (param1, param2, … ,paramn)

See "Functions and Subroutines" for information on parenthesis required in VB Syntax.