Professional Documents
Culture Documents
The object which controls the STAAD.Pro environment is referred to as StaadPro.OpenSTAAD. This object must be created in order to get access to any of the internal graphical func ons within STAAD.Pro (including the crea ng of menu items and dialog boxes) as well as
access to STAAD’s viewing, geometry modeling, results grid, and post-processing func ons. The following VBA func on can be used to instan ate or create this object:
Copy to clipboard
Set MyObject = GetObject("filepath", "ojbectclass")
Where:
Se ng Descrip on
MyObject the Object name declared in a previous Dim statement.
filepath the op onal string providing the full file path and name of the file containing objects to retrieve. In the case of OpenSTAAD, this can be omi ed, along with the trailing comma.
objectclass the string represen ng the class of the object. In the case of OpenSTAAD, this is always Staadpro.OpenSTAAD.
Thus:
Copy to clipboard
Set objName = GetObject("StaadPro.OpenSTAAD")
At the conclusion of your OpenSTAAD applica on, the OpenSTAAD object(s) should be terminated, to unlock the handles within the applica on to the OpenSTAAD func ons, and to free system resources.
Example
Sub How2Begin()
'Create a variable to hold your OpenSTAAD object(s).
'At the end of your application, remember to terminate the OpenSTAAD objects.