Quantcast
Channel: RAM | STAAD Forum - Recent Threads
Viewing all articles
Browse latest Browse all 23543

RE: Problem in creating object with STAAD (I am using STAAD PRo. select series 4) in VBA macro in excel (2013)

$
0
0

GetObject is known as the Application Object. CreateObject is referred to as the Results Object. The functions supported by these objects are called "Application object functions" and "Results object functions" respectively.

As explained by Tank (you will also find a mention of this in section 2.4 of the OpenSTAAD manual), the functions to use in the current versions of STAAD are the Application Object functions.

The other thing is, the Application object works only if

a) an instance of STAAD is running and

b) the model from which you want to extract data (or write data to) is open in that instance.

So, the steps are

1) Start STAAD

2) Open the STAAD model that you want to use with the OpenSTAAD Application object (D:\RRVUNL STAAD\STAAD FILES\STATIC\PRIMARY_R0_STATIC_3-4-2013.std as mentioned in your question).

3) Run the analysis and design. Ensure that results are obtained.

4) Start Microsoft Excel and run the macro.

Accordingly, some preliminary changes needed in your macro to get it going are:

Delete the lines

bIncludePath = True

objOpenSTAAD.GetSTAADFile strFileName, bIncludePath

Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")  --------(error place).

objOpenSTAAD.SelectSTAADFile strFileName

'objOpenSTAAD.SelectSTAADFile "D:\RRVUNL STAAD\STAAD FILES\STATIC\PRIMARY_R0_STATIC_3-4-2013.std"

Probably more are required. We suggest you try the above, and if there is a problem, we will look into your code.


Viewing all articles
Browse latest Browse all 23543

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>