Open STAAD Training
Open STAAD Training
Open STAAD Training
What is OpenSTAAD
OpenSTAAD Features
Connecting STAAD with Excel
OpenSTAAD Reference Manual
OpenSTAAD Functions
Opening/Creating a new STAAD File
Workshop
2
What is Open STAAD
OpenSTAAD is a library of exposed functions allowing engineers access to
STAAD.Pro’s internal functions and routines as well as its graphical
commands.
With OpenSTAAD, you can use Visual Basic for Applications (VBA) macros to
perform such tasks as automating repetitive modeling or post-processing
tasks or embedding customized design routines.
3
OpenSTAAD – More Features
With OpenSTAAD, a simple macro can be written in Excel or within the
STAAD environment to retrieve the appropriate STAAD data and
automatically link the results.
With a built-in VBA editor, macros can be written inside STAAD using VBA to
create new dialog boxes or menu items which run design codes or specific
structural components (like certain connections) that automatically link to
STAAD’s familiar reporting tables.
4
WHAT ALL CAN THIS OPENSTAAD API DO ?
5
Connecting STAAD with Excel
In Visual Basic for Applications (VBA), this may be done by creating an object
variable and then assigning to it the OpenSTAAD object. The VBA GetObject
function may be used for this.
Where:
MyObject: the Object name declared in a previous Dim statement.
Filepath: the optional string providing the full file path and name of the file
containing objects to retrieve. In the case of OpenSTAAD, this can be omitted,
along with the trailing comma.
Objectclass: the string representing the class of the object. In the case of
OpenSTAAD, this is always Staadpro.OpenSTAAD.
Thus :
6
Connecting STAAD with Excel
Example:
7
STAAD Object declarations
Work on the former, if you want to work on the model and the latter if you just
want to work on the results.
8
Adding OpenSTAAD to References
Now, when the Browse Object tool is selected, you will see OpenSTAAD
functions included in the Library list.
9
OpenStaad Functions
10
Opening a Staad File
Example
11
New Staad File
This function creates a .STD file with specified length and force units.
Where:
FileName : A string variable that will hold the name of the .STD file, which needs
to be created.
InputUnitForLength : An integer variable that will hold the input unit to be assigned
for length of the new .STD file. Value may vary from 0 to 7 (0- Inch, 1- Feet, 2-
Feet, 3- CentiMeter, 4-Meter, 5- MilliMeter, 6 - DeciMeter, 7 – KiloMeter).
InputUnitForForce : An integer variable that will hold the input unit to be assigned
for force of the new .STD file. Value may vary from 0 to 7 (0- Kilopound, 1- Pound,
2- Kilogram, 3-Metric Ton, 4- Newton, 5-Kilo Newton, 6- Mega Newton, 7-
DecaNewton).
12
New Staad File
13
The session now onwards will go on as a Workshop.
Target is to create a simple beam design sheet which will use STAAD in
background for calculation.
14
ROOT FUNCTIONS
Analyze
CloseSTAADFile
GetBaseUnit
GetInputUnitForForce
ShowApplication
UpdateStructure
15
GEOMETRY FUNCTIONS
Geometry.AddBeam
Geometry.AddMultipleBeams
Geometry.AddMultipleNodes
Geometry.AddMultiplePlates
Geometry.DeleteBeam
Geometry.DeletePlate
16
VIEW FUNCTIONS
View.CreateNewViewForSelections
View.HideAllMembers
View.HideEntity
View.HideMember
View.HidePlate
View.HideSolid
17
PROPERTIES FUNCTIONS
Property.AssignBeamProperty
Property.AssignBetaAngle
Property.AssignPlateThickness
Property.CreateBeamPropertyFromTable
Property.CreateMemberCompressionSpec
Property.CreateMemberPartialReleaseSpec
18
LOADS FUNCTIONS
Load.AddElementPressure
Load.AddLoadAndFactorToCombination
Load.AddMemberConcForce
Load.AddMemberUniformMoment
Load.AddStrainLoad
Load.GetActiveLoad
19
SUPPORTS FUNCTIONS
Support.AssignSupportToNode
Support.CreateSupportFixed
Support.GetSupportCount
Support.GetSupportNodes
Support.GetSupportType
20
COMMAND FUNCTIONS
Command.CreateSteelDesignCommand
Command.PerformAnalysis
Command.PerformPDeltaAnalysisConverge
Command.PerformPDeltaAnalysisNoConverge
21
OUTPUT RESULTS FUNCTIONS
Output.GetAllPlateCenterForces
Output.GetAllPlateCenterMoments
Output.GetAllPlateCenterStressesAndMoments
Output.GetAllSolildNormalStresses
Output.GetIntermediateMemberForcesAtDistance
Output.GetMemberEndForces
22
RESULTS TABLE FUNCTIONS
Table.AddTable
Table.CreateReport
Table.DeleteTable
23
ROOT FUNCTIONS
Analyze
CloseSTAADFile
GetBaseUnit
GetInputUnitForForce
ShowApplication
UpdateStructure
24
Function Return Value
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.
25
Questions…?
shi-fw.com